GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 2.8 ( 41d2f7...b9ed1f )
by Thorsten
25:52 queued 10:52
created
phpmyfaq/admin/category.translate.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     $protocol = 'http';
23
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
23
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
24 24
         $protocol = 'https';
25 25
     }
26
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
26
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
27 27
     exit();
28 28
 }
29 29
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                     <ul>
104 104
                         <?php
105 105
                         foreach ($category->getCategoryLanguagesTranslated($id) as $language => $namedesc) {
106
-                            print "<li><strong>" . $language . "</strong>: " . $namedesc . "</li>";
106
+                            print "<li><strong>".$language."</strong>: ".$namedesc."</li>";
107 107
                         }
108 108
                         ?>
109 109
                     </ul>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,9 +59,12 @@
 block discarded – undo
59 59
             <input type="hidden" name="showcat" value="<?php print $showcat; ?>" />
60 60
             <?php if ($faqConfig->get('security.permLevel') !== 'basic'): ?>
61 61
             <input type="hidden" name="restricted_groups" value="<?php print $group_permission[0]; ?>" />
62
-            <?php else: ?>
62
+            <?php else {
63
+    : ?>
63 64
             <input type="hidden" name="restricted_groups" value="-1" />
64
-            <?php endif; ?>
65
+            <?php endif;
66
+}
67
+?>
65 68
             <input type="hidden" name="restricted_users" value="<?php print $user_permission[0]; ?>" />
66 69
             <input type="hidden" name="csrf" value="<?php print $user->getCsrfTokenFromSession(); ?>" />
67 70
 
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Translates a category
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Administration
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @author    Rudi Ferrari <[email protected]>
15
- * @copyright 2006-2016 phpMyFAQ Team
16
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
- * @link      http://www.phpmyfaq.de
18
- * @since     2006-09-10
19
- */
3
+     * Translates a category
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Administration
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @author    Rudi Ferrari <[email protected]>
15
+     * @copyright 2006-2016 phpMyFAQ Team
16
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
+     * @link      http://www.phpmyfaq.de
18
+     * @since     2006-09-10
19
+     */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     $protocol = 'http';
Please login to merge, or discard this patch.
phpmyfaq/admin/trans.edit.php 3 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
22
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
22
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
23 23
         $protocol = 'https';
24 24
     }
25
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
25
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
26 26
     exit();
27 27
 }
28 28
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 $page = PMF_Filter::filterInput(INPUT_GET, 'page', FILTER_VALIDATE_INT);
37 37
 $page = 1 > $page ? 1 : $page;
38 38
 
39
-if (empty($translateLang) || !file_exists(PMF_ROOT_DIR . "/lang/language_$translateLang.php")) {
39
+if (empty($translateLang) || !file_exists(PMF_ROOT_DIR."/lang/language_$translateLang.php")) {
40 40
     header("Location: ?action=translist");
41 41
 }
42 42
 
@@ -48,23 +48,23 @@  discard block
 block discarded – undo
48 48
  * at once, so let's paginate.
49 49
  */
50 50
 $itemsPerPage = 32;
51
-if(!isset($_SESSION['trans'])) {
51
+if (!isset($_SESSION['trans'])) {
52 52
     /**
53 53
      * English is our exemplary language
54 54
      */
55
-    $_SESSION['trans']['leftVarsOnly']  = $tt->getVars(PMF_ROOT_DIR . "/lang/language_en.php");
56
-    $_SESSION['trans']['rightVarsOnly'] = $tt->getVars(PMF_ROOT_DIR . "/lang/language_$translateLang.php");
55
+    $_SESSION['trans']['leftVarsOnly']  = $tt->getVars(PMF_ROOT_DIR."/lang/language_en.php");
56
+    $_SESSION['trans']['rightVarsOnly'] = $tt->getVars(PMF_ROOT_DIR."/lang/language_$translateLang.php");
57 57
     
58 58
 }
59 59
 
60 60
 $leftVarsOnly   = array_slice($_SESSION['trans']['leftVarsOnly'], 
61
-                              ($page-1)*$itemsPerPage,
61
+                              ($page - 1)*$itemsPerPage,
62 62
                               $itemsPerPage);
63 63
 $rightVarsOnly  = &$_SESSION['trans']['rightVarsOnly'];
64 64
 
65 65
 
66 66
 $options = array(
67
-    'baseUrl' => PMF_Link::getSystemRelativeUri('index.php') . '?' . str_replace('&', '&amp;', $_SERVER['QUERY_STRING']),
67
+    'baseUrl' => PMF_Link::getSystemRelativeUri('index.php').'?'.str_replace('&', '&amp;', $_SERVER['QUERY_STRING']),
68 68
     'total'   => count($_SESSION['trans']['leftVarsOnly']),
69 69
     'perPage' => $itemsPerPage
70 70
 );
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             <th>en</th>
93 93
             <th><?php print $translateLang ?></th>
94 94
         </tr>
95
-        <?php while(list($key, $line) = each($leftVarsOnly)): ?>
95
+        <?php while (list($key, $line) = each($leftVarsOnly)): ?>
96 96
         <?php
97 97
     // These parameters are not real translations, so don't offer to translate them
98 98
     if ($tt->isKeyIgnorable($key)) {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             </td>
196 196
             <td>
197 197
                 <button class="btn btn-success" type="button"
198
-                        onclick="save()"<?php if (!is_writable(PMF_ROOT_DIR . "/lang/language_$translateLang.php")) { print ' disabled="disabled"'; } ?>>
198
+                        onclick="save()"<?php if (!is_writable(PMF_ROOT_DIR."/lang/language_$translateLang.php")) { print ' disabled="disabled"'; } ?>>
199 199
                     <?php print $PMF_LANG['msgSave'] ?>
200 200
                 </button>
201 201
             </td>
Please login to merge, or discard this patch.
Braces   +23 added lines, -16 removed lines patch added patch discarded remove patch
@@ -110,8 +110,9 @@  discard block
 block discarded – undo
110 110
      */
111 111
 
112 112
     // We deal with the second plural form when dealing with the first, so skip it here
113
-    if ($tt->isKeyASecondPluralForm($key))
114
-        continue;
113
+    if ($tt->isKeyASecondPluralForm($key)) {
114
+            continue;
115
+    }
115 116
 
116 117
     if ($tt->isKeyAFirstPluralForm($key)) {
117 118
         if ($rightNPlurals == -1) {
@@ -132,10 +133,11 @@  discard block
 block discarded – undo
132 133
         print "<td>".$key."</td>\n";
133 134
         print '<td><input style="width: 300px;" type="text" value="'.PMF_String::htmlspecialchars($line).'" disabled="disabled" /></td>'."\n";
134 135
         if (array_key_exists($key, $rightVarsOnly) && ($line != $rightVarsOnly[$key] ||
135
-           $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line)))
136
-            print '<td><input style="width: 300px;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key]).'" /></td>'."\n";
137
-        else
138
-            print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($line).'" /></td>'."\n";
136
+           $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line))) {
137
+                    print '<td><input style="width: 300px;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key]).'" /></td>'."\n";
138
+        } else {
139
+                    print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key.'" value="'.PMF_String::htmlspecialchars($line).'" /></td>'."\n";
140
+        }
139 141
         print "</tr>\n";
140 142
 
141 143
         // Add second English form and translation
@@ -147,10 +149,11 @@  discard block
 block discarded – undo
147 149
             // Other language has only one form
148 150
             print '<td><input style="width: 300px;" type="text" value="'.$PMF_LANG['msgTransToolLanguageOnePlural'].'" disabled="disabled" /></td>'."\n";
149 151
         } else {
150
-            if (array_key_exists($key2, $rightVarsOnly))
151
-                print '<td><input style="width: 300px;" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key2]).'" /></td>'."\n";
152
-            else
153
-                print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n";
152
+            if (array_key_exists($key2, $rightVarsOnly)) {
153
+                            print '<td><input style="width: 300px;" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$key2]).'" /></td>'."\n";
154
+            } else {
155
+                            print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$key2.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n";
156
+            }
154 157
         }
155 158
         print "</tr>\n";
156 159
 
@@ -160,10 +163,11 @@  discard block
 block discarded – undo
160 163
             print "<tr>\n";
161 164
             print "<td>".$keyI."</td>\n";
162 165
             print '<td><input style="width: 300px;" type="text" value="" disabled="disabled" /></td>'."\n";
163
-            if (array_key_exists($keyI, $rightVarsOnly) && $leftVarsOnly[$key2] != $rightVarsOnly[$key])
164
-                print '<td><input style="width: 300px;" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$keyI]).'" /></td>'."\n";
165
-            else
166
-                print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n";
166
+            if (array_key_exists($keyI, $rightVarsOnly) && $leftVarsOnly[$key2] != $rightVarsOnly[$key]) {
167
+                            print '<td><input style="width: 300px;" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($rightVarsOnly[$keyI]).'" /></td>'."\n";
168
+            } else {
169
+                            print '<td><input style="width: 300px;border-color: red;" type="text" name="'.$keyI.'" value="'.PMF_String::htmlspecialchars($leftVarsOnly[$key2]).'" /></td>'."\n";
170
+            }
167 171
             print "</tr>\n";
168 172
         }
169 173
         // We do not need to process this $key any further
@@ -178,9 +182,12 @@  discard block
 block discarded – undo
178 182
                    $tt->isKeyIgnorable($key) || $tt->isValIgnorable($line))):
179 183
             ?>
180 184
             <td><input style="width: 300px;" type="text" name="<?php print $key?>" value="<?php print PMF_String::htmlspecialchars($rightVarsOnly[$key]) ?>" /></td>
181
-            <?php else: ?>
185
+            <?php else {
186
+    : ?>
182 187
             <td><input style="width: 300px;border-color: red;" type="text" name="<?php print $key?>" value="<?php print PMF_String::htmlspecialchars($line) ?>" /></td>
183
-            <?php endif; ?>
188
+            <?php endif;
189
+}
190
+?>
184 191
         </tr>
185 192
         <?php endwhile; ?>
186 193
         <tr>
Please login to merge, or discard this patch.
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Handle ajax requests for the interface translation tool
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Administration
13
- * @author    Anatoliy Belsky <[email protected]>
14
- * @copyright 2009-2016 phpMyFAQ Team
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @since     2009-05-11
18
- */
3
+     * Handle ajax requests for the interface translation tool
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Administration
13
+     * @author    Anatoliy Belsky <[email protected]>
14
+     * @copyright 2009-2016 phpMyFAQ Team
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @since     2009-05-11
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 }
59 59
 
60 60
 $leftVarsOnly   = array_slice($_SESSION['trans']['leftVarsOnly'], 
61
-                              ($page-1)*$itemsPerPage,
62
-                              $itemsPerPage);
61
+                                ($page-1)*$itemsPerPage,
62
+                                $itemsPerPage);
63 63
 $rightVarsOnly  = &$_SESSION['trans']['rightVarsOnly'];
64 64
 
65 65
 
Please login to merge, or discard this patch.
phpmyfaq/admin/category.main.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
22
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
22
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
23 23
         $protocol = 'https';
24 24
     }
25
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
25
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
26 26
     exit();
27 27
 }
28 28
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                         <i class="icon-plus icon-white"></i> <?php print $PMF_LANG['ad_kateg_add']; ?>
36 36
                     </a>
37 37
                     <a class="btn btn-info" href="?action=showcategory">
38
-                        <i class="icon-th icon-white"></i> <?php print $PMF_LANG['ad_categ_show'];?>
38
+                        <i class="icon-th icon-white"></i> <?php print $PMF_LANG['ad_categ_show']; ?>
39 39
                     </a>
40 40
                 </div>
41 41
             </h2>
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         if ($cat['lang'] == $lang) {
268 268
             $categoryName = $cat['name'];
269 269
         } else {
270
-            $categoryName = $cat['name'] . ' (' . $languageCodes[strtoupper($cat['lang'])] . ')';
270
+            $categoryName = $cat['name'].' ('.$languageCodes[strtoupper($cat['lang'])].')';
271 271
         }
272 272
 
273 273
         $level     = $cat['indent'];
Please login to merge, or discard this patch.
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * List all categories in the admin section
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Administration
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @copyright 2003-2016 phpMyFAQ Team
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @since     2003-12-20
18
- */
3
+     * List all categories in the admin section
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Administration
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @copyright 2003-2016 phpMyFAQ Team
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @since     2003-12-20
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
@@ -310,20 +310,20 @@  discard block
 block discarded – undo
310 310
         }
311 311
 
312 312
         if ($cat["lang"] == $lang) {
313
-           // add sub category (if current language)
314
-           printf('
313
+            // add sub category (if current language)
314
+            printf('
315 315
             <a class="btn btn-info btn-mini" href="?action=addcategory&amp;cat=%s&amp;lang=%s"><span title="%s" class="icon-plus-sign icon-white"></span></a> ',
316
-               $cat['id'],
317
-               $cat['lang'],
318
-               $PMF_LANG['ad_quick_category']
319
-           );
316
+                $cat['id'],
317
+                $cat['lang'],
318
+                $PMF_LANG['ad_quick_category']
319
+            );
320 320
 
321
-           // rename (sub) category (if current language)
322
-           printf('
321
+            // rename (sub) category (if current language)
322
+            printf('
323 323
                <a class="btn btn-info btn-mini" href="?action=editcategory&amp;cat=%s"><span title="%s" class="icon-edit icon-white"></a> ',
324
-               $cat['id'],
325
-               $PMF_LANG['ad_kateg_rename']
326
-           );
324
+                $cat['id'],
325
+                $PMF_LANG['ad_kateg_rename']
326
+            );
327 327
         }
328 328
 
329 329
         // translate category (always)
@@ -346,22 +346,22 @@  discard block
 block discarded – undo
346 346
         }
347 347
 
348 348
         if ($cat["lang"] == $lang) {
349
-           // cut category (if current language)
350
-           printf(
351
-               '<a class="btn btn-warning btn-mini" href="?action=cutcategory&amp;cat=%s"><span title="%s" class="icon-cut icon-white"></a> ',
352
-               $cat['id'],
353
-               $PMF_LANG['ad_categ_cut']
354
-           );
355
-
356
-           if ($category->numParent($cat['parent_id']) > 1) {
357
-              // move category (if current language) AND more than 1 category at the same level)
358
-              printf(
359
-                  '<a class="btn btn-warning btn-mini" href="?action=movecategory&amp;cat=%s&amp;parent_id=%s"><span title="%s" class="icon-resize-vertical icon-white"></a> ',
360
-                  $cat['id'],
361
-                  $cat['parent_id'],
362
-                  $PMF_LANG['ad_categ_move']
363
-              );
364
-           }
349
+            // cut category (if current language)
350
+            printf(
351
+                '<a class="btn btn-warning btn-mini" href="?action=cutcategory&amp;cat=%s"><span title="%s" class="icon-cut icon-white"></a> ',
352
+                $cat['id'],
353
+                $PMF_LANG['ad_categ_cut']
354
+            );
355
+
356
+            if ($category->numParent($cat['parent_id']) > 1) {
357
+                // move category (if current language) AND more than 1 category at the same level)
358
+                printf(
359
+                    '<a class="btn btn-warning btn-mini" href="?action=movecategory&amp;cat=%s&amp;parent_id=%s"><span title="%s" class="icon-resize-vertical icon-white"></a> ',
360
+                    $cat['id'],
361
+                    $cat['parent_id'],
362
+                    $PMF_LANG['ad_categ_move']
363
+                );
364
+            }
365 365
         }
366 366
 
367 367
         $open      = $level;
Please login to merge, or discard this patch.
phpmyfaq/admin/instances.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
22
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
22
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
23 23
         $protocol = 'https';
24 24
     }
25
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
25
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
26 26
     exit();
27 27
 }
28 28
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     <header>
31 31
         <h2>
32 32
             <i class="icon-wrench"></i> <?php print $PMF_LANG['ad_menu_instances']; ?>
33
-            <?php if ($permission['addinstances'] && is_writable(PMF_ROOT_DIR . DIRECTORY_SEPARATOR . 'multisite')): ?>
33
+            <?php if ($permission['addinstances'] && is_writable(PMF_ROOT_DIR.DIRECTORY_SEPARATOR.'multisite')): ?>
34 34
             <div class="pull-right">
35 35
                 <a class="btn btn-success" data-toggle="modal" href="#pmf-modal-add-instance">
36 36
                     <i class="icon-plus"></i> <?php echo $PMF_LANG["ad_instance_add"] ?>
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     $instanceId = PMF_Filter::filterInput(INPUT_POST, 'instance_id', FILTER_VALIDATE_INT);
47 47
 
48 48
     // Check, if /multisite is writeable
49
-    if (! is_writable(PMF_ROOT_DIR . DIRECTORY_SEPARATOR . 'multisite')) {
49
+    if (!is_writable(PMF_ROOT_DIR.DIRECTORY_SEPARATOR.'multisite')) {
50 50
         printf(
51 51
             '<p class="alert alert-error">%s</p>',
52 52
             $PMF_LANG["ad_instance_error_notwritable"]
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         ?>
99 99
         <tr id="row-instance-<?php print $site->id ?>">
100 100
             <td><?php print $site->id ?></td>
101
-            <td><a href="<?php print $site->url . $site->instance ?>"><?php print $site->url ?></a></td>
101
+            <td><a href="<?php print $site->url.$site->instance ?>"><?php print $site->url ?></a></td>
102 102
             <td><?php print $site->instance ?></td>
103 103
             <td><?php print $site->comment ?></td>
104 104
             <td>
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The main multi-site instances frontend
4
- *
5
- * PHP 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Administration
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @copyright 2012-2016 phpMyFAQ Team
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @since     2012-03-16
18
- */
3
+     * The main multi-site instances frontend
4
+     *
5
+     * PHP 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Administration
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @copyright 2012-2016 phpMyFAQ Team
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @since     2012-03-16
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
Please login to merge, or discard this patch.
phpmyfaq/admin/ajax.user.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
22
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
22
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
23 23
         $protocol = 'https';
24 24
     }
25
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
25
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
26 26
     exit();
27 27
 }
28 28
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
             $user->getUserById($userId, true);
78 78
             if ($user->getStatus() == 'protected' || $userId == 1) {
79
-                $message = '<p class="error">' . $PMF_LANG['ad_user_error_protectedAccount'] . '</p>';
79
+                $message = '<p class="error">'.$PMF_LANG['ad_user_error_protectedAccount'].'</p>';
80 80
             } else {
81 81
                 if (!$user->deleteUser()) {
82 82
                     $message = $PMF_LANG['ad_user_error_delete'];
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                         $permissions->removeFromAllGroups($userId);
91 91
                     }
92 92
     
93
-                    $message = '<p class="success">' . $PMF_LANG['ad_user_deleted'] . '</p>';
93
+                    $message = '<p class="success">'.$PMF_LANG['ad_user_deleted'].'</p>';
94 94
                 }
95 95
             }
96 96
             print json_encode($message);
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * AJAX: handling of Ajax user calls
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Administration
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @copyright 2009-2016 phpMyFAQ Team
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @since     2009-04-04
18
- */
3
+     * AJAX: handling of Ajax user calls
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Administration
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @copyright 2009-2016 phpMyFAQ Team
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @since     2009-04-04
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
Please login to merge, or discard this patch.
phpmyfaq/admin/report.export.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     $protocol = 'http';
23
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
23
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
24 24
         $protocol = 'https';
25 25
     }
26
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
26
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
27 27
     exit();
28 28
 }
29 29
 
@@ -45,18 +45,18 @@  discard block
 block discarded – undo
45 45
 
46 46
     $text    = array();
47 47
     $text[0] = array();
48
-    ($useCategory)     ? $text[0][] = $PMF_LANG['ad_stat_report_category'] : '';
49
-    ($useSubcategory)  ? $text[0][] = $PMF_LANG['ad_stat_report_sub_category'] : '';
50
-    ($useTranslation)  ? $text[0][] = $PMF_LANG['ad_stat_report_translations'] : '';
51
-    ($useLanguage)     ? $text[0][] = $PMF_LANG['ad_stat_report_language'] : '';
52
-    ($useId)           ? $text[0][] = $PMF_LANG['ad_stat_report_id'] : '';
53
-    ($useSticky)       ? $text[0][] = $PMF_LANG['ad_stat_report_sticky'] : '';
54
-    ($useTitle)        ? $text[0][] = $PMF_LANG['ad_stat_report_title'] : '';
48
+    ($useCategory) ? $text[0][] = $PMF_LANG['ad_stat_report_category'] : '';
49
+    ($useSubcategory) ? $text[0][] = $PMF_LANG['ad_stat_report_sub_category'] : '';
50
+    ($useTranslation) ? $text[0][] = $PMF_LANG['ad_stat_report_translations'] : '';
51
+    ($useLanguage) ? $text[0][] = $PMF_LANG['ad_stat_report_language'] : '';
52
+    ($useId) ? $text[0][] = $PMF_LANG['ad_stat_report_id'] : '';
53
+    ($useSticky) ? $text[0][] = $PMF_LANG['ad_stat_report_sticky'] : '';
54
+    ($useTitle) ? $text[0][] = $PMF_LANG['ad_stat_report_title'] : '';
55 55
     ($useCreationDate) ? $text[0][] = $PMF_LANG['ad_stat_report_creation_date'] : '';
56
-    ($useOwner)        ? $text[0][] = $PMF_LANG['ad_stat_report_owner'] : '';
56
+    ($useOwner) ? $text[0][] = $PMF_LANG['ad_stat_report_owner'] : '';
57 57
     ($useLastModified) ? $text[0][] = $PMF_LANG['ad_stat_report_last_modified_person'] : '';
58
-    ($useUrl)          ? $text[0][] = $PMF_LANG['ad_stat_report_url'] : '';
59
-    ($useVisits)       ? $text[0][] = $PMF_LANG['ad_stat_report_visits'] : '';
58
+    ($useUrl) ? $text[0][] = $PMF_LANG['ad_stat_report_url'] : '';
59
+    ($useVisits) ? $text[0][] = $PMF_LANG['ad_stat_report_visits'] : '';
60 60
 
61 61
     $report = new PMF_Report($faqConfig);
62 62
 
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Export of a generated report
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Administration
13
- * @author    Gustavo Solt <[email protected]>
14
- * @author    Thorsten Rinne <[email protected]>
15
- * @copyright 2011-2016 phpMyFAQ Team
16
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
- * @link      http://www.phpmyfaq.de
18
- * @since     2011-01-12
19
- */
3
+     * Export of a generated report
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Administration
13
+     * @author    Gustavo Solt <[email protected]>
14
+     * @author    Thorsten Rinne <[email protected]>
15
+     * @copyright 2011-2016 phpMyFAQ Team
16
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
+     * @link      http://www.phpmyfaq.de
18
+     * @since     2011-01-12
19
+     */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     $protocol = 'http';
Please login to merge, or discard this patch.
phpmyfaq/admin/trans.list.php 3 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -20,19 +20,19 @@  discard block
 block discarded – undo
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     $protocol = 'http';
23
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
23
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
24 24
         $protocol = 'https';
25 25
     }
26
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
26
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
27 27
     exit();
28 28
 }
29 29
 
30 30
 clearstatcache();
31
-if(isset($_SESSION['trans'])) {
31
+if (isset($_SESSION['trans'])) {
32 32
     unset($_SESSION['trans']);
33 33
 }
34 34
 
35
-$langDir            = PMF_ROOT_DIR . DIRECTORY_SEPARATOR . "lang";
35
+$langDir            = PMF_ROOT_DIR.DIRECTORY_SEPARATOR."lang";
36 36
 $transDir           = new DirectoryIterator($langDir);
37 37
 $isTransDirWritable = is_writable($langDir);
38 38
 $tt                 = new PMF_TransTool;
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         <header>
41 41
             <h2>
42 42
                 <i class="icon-wrench"></i> <?php echo $PMF_LANG['ad_menu_translations'] ?>
43
-                <?php if($permission["addtranslation"] && $isTransDirWritable): ?>
43
+                <?php if ($permission["addtranslation"] && $isTransDirWritable): ?>
44 44
                 <div class="pull-right">
45 45
                     <a class="btn btn-success" href="?action=transadd">
46 46
                         <i class="icon-plus"></i> <?php echo $PMF_LANG['msgTransToolAddNewTranslation'] ?>
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 
53 53
         <p><?php echo $PMF_LANG['msgChooseLanguageToTranslate'] ?>:</p>
54 54
 
55
-        <?php if(!$isTransDirWritable):
56
-            echo '<p class="alert alert-error">'. $PMF_LANG['msgLangDirIsntWritable'] . "</p>";
55
+        <?php if (!$isTransDirWritable):
56
+            echo '<p class="alert alert-error">'.$PMF_LANG['msgLangDirIsntWritable']."</p>";
57 57
         endif; ?>
58 58
 
59 59
         <table class="table table-striped">
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             /**
77 77
              * English is our exemplary language which won't be changed
78 78
              */
79
-            if('en' == $lang) {
79
+            if ('en' == $lang) {
80 80
                 continue;
81 81
             }
82 82
             
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
     sort($sortedLangList);
88 88
     
89 89
     while (list(,$lang) = each($sortedLangList)) { 
90
-        $isLangFileWritable = is_writable($langDir . DIRECTORY_SEPARATOR . "language_$lang.php");
90
+        $isLangFileWritable = is_writable($langDir.DIRECTORY_SEPARATOR."language_$lang.php");
91 91
         $showActions        = $isTransDirWritable && $isLangFileWritable;
92 92
         ?>
93 93
             <tr class="lang_<?php echo $lang ?>_container">
94 94
                 <td><?php echo $languageCodes[strtoupper($lang)] ?></td>
95
-                <?php if($permission["edittranslation"] && $showActions): ?>
95
+                <?php if ($permission["edittranslation"] && $showActions): ?>
96 96
                 <td>
97 97
                     <a class="btn btn-primary" href="?action=transedit&amp;translang=<?php echo $lang ?>" >
98 98
                         <i class="icon-edit icon-white"></i>
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                 <?php else: ?>
103 103
                 <td><?php echo $PMF_LANG['msgEdit'] ?></td>
104 104
                 <?php endif; ?>
105
-                <?php if($permission["deltranslation"] && $showActions): ?>
105
+                <?php if ($permission["deltranslation"] && $showActions): ?>
106 106
                 <td>
107 107
                     <a class="btn btn-danger" href="javascript: del('<?php echo $lang ?>');" >
108 108
                         <i class="icon-remove icon-white"></i>
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 <?php else: ?>
113 113
                 <td><?php echo $PMF_LANG['msgDelete'] ?></td>
114 114
                 <?php endif; ?>
115
-                <?php if($permission["edittranslation"] && $showActions): ?>
115
+                <?php if ($permission["edittranslation"] && $showActions): ?>
116 116
                 <td>
117 117
                     <a class="btn btn-success" href="javascript: sendToTeam('<?php echo $lang ?>');" >
118 118
                         <i class="icon-upload icon-white"></i>
@@ -121,15 +121,15 @@  discard block
 block discarded – undo
121 121
                 </td>
122 122
                 <?php else: ?>
123 123
                 <td><?php echo $PMF_LANG['msgTransToolSendToTeam'] ?></td>
124
-                <?php endif;?>
125
-                <?php if($isLangFileWritable): ?>
124
+                <?php endif; ?>
125
+                <?php if ($isLangFileWritable): ?>
126 126
                 <td><i class="icon-ok-circle"></i> <?php echo $PMF_LANG['msgYes'] ?></td>
127 127
                 <?php else: ?>
128 128
                 <td><i class="icon-ban-circle"></i> <?php echo $PMF_LANG['msgNo'] ?></td>
129 129
                 <?php endif; ?>
130 130
                 <td><?php echo $tt->getTranslatedPercentage(
131
-                    $langDir . DIRECTORY_SEPARATOR . "language_en.php",
132
-                    $langDir . DIRECTORY_SEPARATOR . "language_$lang.php"
131
+                    $langDir.DIRECTORY_SEPARATOR."language_en.php",
132
+                    $langDir.DIRECTORY_SEPARATOR."language_$lang.php"
133 133
                 ); ?>%</td>
134 134
             </tr>
135 135
         <?php 
Please login to merge, or discard this patch.
Braces   +20 added lines, -8 removed lines patch added patch discarded remove patch
@@ -99,9 +99,12 @@  discard block
 block discarded – undo
99 99
                         <?php echo $PMF_LANG['msgEdit'] ?>
100 100
                     </a>
101 101
                 </td>
102
-                <?php else: ?>
102
+                <?php else {
103
+    : ?>
103 104
                 <td><?php echo $PMF_LANG['msgEdit'] ?></td>
104
-                <?php endif; ?>
105
+                <?php endif;
106
+}
107
+?>
105 108
                 <?php if($permission["deltranslation"] && $showActions): ?>
106 109
                 <td>
107 110
                     <a class="btn btn-danger" href="javascript: del('<?php echo $lang ?>');" >
@@ -109,9 +112,12 @@  discard block
 block discarded – undo
109 112
                         <?php echo $PMF_LANG['msgDelete'] ?>
110 113
                     </a>
111 114
                 </td>
112
-                <?php else: ?>
115
+                <?php else {
116
+    : ?>
113 117
                 <td><?php echo $PMF_LANG['msgDelete'] ?></td>
114
-                <?php endif; ?>
118
+                <?php endif;
119
+}
120
+?>
115 121
                 <?php if($permission["edittranslation"] && $showActions): ?>
116 122
                 <td>
117 123
                     <a class="btn btn-success" href="javascript: sendToTeam('<?php echo $lang ?>');" >
@@ -119,14 +125,20 @@  discard block
 block discarded – undo
119 125
                         <?php echo $PMF_LANG['msgTransToolSendToTeam'] ?>
120 126
                     </a>
121 127
                 </td>
122
-                <?php else: ?>
128
+                <?php else {
129
+    : ?>
123 130
                 <td><?php echo $PMF_LANG['msgTransToolSendToTeam'] ?></td>
124
-                <?php endif;?>
131
+                <?php endif;
132
+}
133
+?>
125 134
                 <?php if($isLangFileWritable): ?>
126 135
                 <td><i class="icon-ok-circle"></i> <?php echo $PMF_LANG['msgYes'] ?></td>
127
-                <?php else: ?>
136
+                <?php else {
137
+    : ?>
128 138
                 <td><i class="icon-ban-circle"></i> <?php echo $PMF_LANG['msgNo'] ?></td>
129
-                <?php endif; ?>
139
+                <?php endif;
140
+}
141
+?>
130 142
                 <td><?php echo $tt->getTranslatedPercentage(
131 143
                     $langDir . DIRECTORY_SEPARATOR . "language_en.php",
132 144
                     $langDir . DIRECTORY_SEPARATOR . "language_$lang.php"
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * List avaliable interface translations and actions
4
- * depending on user right
5
- *
6
- * PHP Version 5.3
7
- *
8
- * This Source Code Form is subject to the terms of the Mozilla Public License,
9
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
- * obtain one at http://mozilla.org/MPL/2.0/.
11
- *
12
- * @category  phpMyFAQ
13
- * @package   Administration
14
- * @author    Anatoliy Belsky <[email protected]>
15
- * @copyright 2009-2016 phpMyFAQ Team
16
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
- * @link      http://www.phpmyfaq.de
18
- * @since     2009-05-11
19
- */
3
+     * List avaliable interface translations and actions
4
+     * depending on user right
5
+     *
6
+     * PHP Version 5.3
7
+     *
8
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
9
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
10
+     * obtain one at http://mozilla.org/MPL/2.0/.
11
+     *
12
+     * @category  phpMyFAQ
13
+     * @package   Administration
14
+     * @author    Anatoliy Belsky <[email protected]>
15
+     * @copyright 2009-2016 phpMyFAQ Team
16
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
+     * @link      http://www.phpmyfaq.de
18
+     * @since     2009-05-11
19
+     */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     $protocol = 'http';
Please login to merge, or discard this patch.
phpmyfaq/admin/category.edit.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
22
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
22
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
23 23
         $protocol = 'https';
24 24
     }
25
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
25
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
26 26
     exit();
27 27
 }
28 28
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $restrictedGroups = true;
53 53
     }
54 54
 
55
-    $header = $PMF_LANG['ad_categ_edit_1'] . ' ' . $categories[$categoryId]['name'] . ' ' . $PMF_LANG['ad_categ_edit_2'];
55
+    $header = $PMF_LANG['ad_categ_edit_1'].' '.$categories[$categoryId]['name'].' '.$PMF_LANG['ad_categ_edit_2'];
56 56
 ?>
57 57
 
58 58
         <header>
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Edits a category
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Administration
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @copyright 2003-2016 phpMyFAQ Team
15
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
- * @link      http://www.phpmyfaq.de
17
- * @since     2003-03-10
18
- */
3
+     * Edits a category
4
+     *
5
+     * PHP Version 5.3
6
+     *
7
+     * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+     * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+     * obtain one at http://mozilla.org/MPL/2.0/.
10
+     *
11
+     * @category  phpMyFAQ
12
+     * @package   Administration
13
+     * @author    Thorsten Rinne <[email protected]>
14
+     * @copyright 2003-2016 phpMyFAQ Team
15
+     * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
16
+     * @link      http://www.phpmyfaq.de
17
+     * @since     2003-03-10
18
+     */
19 19
 
20 20
 if (!defined('IS_VALID_PHPMYFAQ')) {
21 21
     $protocol = 'http';
Please login to merge, or discard this patch.
phpmyfaq/admin/category.showstructure.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     $protocol = 'http';
23
-    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON'){
23
+    if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') {
24 24
         $protocol = 'https';
25 25
     }
26
-    header('Location: ' . $protocol . '://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME']));
26
+    header('Location: '.$protocol.'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['SCRIPT_NAME']));
27 27
     exit();
28 28
 }
29 29
 
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
                 <th><?php print $currentLanguage ?></th>
73 73
                 <?php
74 74
                 // get languages in use for all categories
75
-                $all_languages = $faqConfig->getLanguage()->languageAvailable(0, $table='faqcategories');
75
+                $all_languages = $faqConfig->getLanguage()->languageAvailable(0, $table = 'faqcategories');
76 76
                 foreach ($all_languages as $lang) {
77 77
                    $all_lang[$lang] = $languageCodes[strtoupper($lang)];
78 78
                 }
79 79
                 asort($all_lang);
80
-                foreach($all_lang as $lang => $language) {
80
+                foreach ($all_lang as $lang => $language) {
81 81
                    if ($language != $currentLanguage) {
82
-                      printf("<th>" . $language . "</th>\n", $language);
82
+                      printf("<th>".$language."</th>\n", $language);
83 83
                    }
84 84
                 }
85 85
                 ?>
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         // get languages in use for categories
121 121
         $id_languages = $category->getCategoryLanguagesTranslated($cat["id"]);
122 122
 
123
-        foreach($all_lang as $lang => $language) {
123
+        foreach ($all_lang as $lang => $language) {
124 124
             if ($language == $currentLanguage) {
125 125
                 continue;
126 126
             }
Please login to merge, or discard this patch.
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,22 +1,22 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * build table of all categories in all languages
4
- *
5
- * PHP Version 5.3
6
- *
7
- * This Source Code Form is subject to the terms of the Mozilla Public License,
8
- * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
- * obtain one at http://mozilla.org/MPL/2.0/.
10
- *
11
- * @category  phpMyFAQ
12
- * @package   Administration
13
- * @author    Thorsten Rinne <[email protected]>
14
- * @author    Rudi Ferrari <[email protected]>
15
- * @copyright 2006-2016 phpMyFAQ Team
16
- * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
- * @link      http://www.phpmyfaq.de
18
- * @since     2006-09-18
19
- */
3
+         * build table of all categories in all languages
4
+         *
5
+         * PHP Version 5.3
6
+         *
7
+         * This Source Code Form is subject to the terms of the Mozilla Public License,
8
+         * v. 2.0. If a copy of the MPL was not distributed with this file, You can
9
+         * obtain one at http://mozilla.org/MPL/2.0/.
10
+         *
11
+         * @category  phpMyFAQ
12
+         * @package   Administration
13
+         * @author    Thorsten Rinne <[email protected]>
14
+         * @author    Rudi Ferrari <[email protected]>
15
+         * @copyright 2006-2016 phpMyFAQ Team
16
+         * @license   http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
17
+         * @link      http://www.phpmyfaq.de
18
+         * @since     2006-09-18
19
+         */
20 20
 
21 21
 if (!defined('IS_VALID_PHPMYFAQ')) {
22 22
     $protocol = 'http';
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
                 // get languages in use for all categories
75 75
                 $all_languages = $faqConfig->getLanguage()->languageAvailable(0, $table='faqcategories');
76 76
                 foreach ($all_languages as $lang) {
77
-                   $all_lang[$lang] = $languageCodes[strtoupper($lang)];
77
+                    $all_lang[$lang] = $languageCodes[strtoupper($lang)];
78 78
                 }
79 79
                 asort($all_lang);
80 80
                 foreach($all_lang as $lang => $language) {
81
-                   if ($language != $currentLanguage) {
82
-                      printf("<th>" . $language . "</th>\n", $language);
83
-                   }
81
+                    if ($language != $currentLanguage) {
82
+                        printf("<th>" . $language . "</th>\n", $language);
83
+                    }
84 84
                 }
85 85
                 ?>
86 86
             </tr>
@@ -101,15 +101,15 @@  discard block
 block discarded – undo
101 101
         // show category name in actual language
102 102
         print '<td>';
103 103
         if ($cat['lang'] != $LANGCODE) {
104
-           // translate category
105
-           printf(
106
-               '<a href="%s?action=translatecategory&amp;cat=%s&amp;trlang=%s" title="%s"><span title="%s" class="icon-share"></span></a></a>',
107
-               $currentLink,
108
-               $cat['id'],
109
-               $LANGCODE,
110
-               $PMF_LANG['ad_categ_translate'],
111
-               $PMF_LANG['ad_categ_translate']
112
-           );
104
+            // translate category
105
+            printf(
106
+                '<a href="%s?action=translatecategory&amp;cat=%s&amp;trlang=%s" title="%s"><span title="%s" class="icon-share"></span></a></a>',
107
+                $currentLink,
108
+                $cat['id'],
109
+                $LANGCODE,
110
+                $PMF_LANG['ad_categ_translate'],
111
+                $PMF_LANG['ad_categ_translate']
112
+            );
113 113
         }
114 114
         printf("&nbsp;%s<strong>%s</strong>",
115 115
             $indent,
Please login to merge, or discard this patch.