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 ( 731d0f...651d2c )
by Thorsten
29:16 queued 15:10
created
phpmyfaq/admin/category.translate.php 2 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.
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   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@
 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   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -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 1 patch
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.
phpmyfaq/admin/ajax.user.php 1 patch
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.
phpmyfaq/admin/category.move.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@
 block discarded – undo
56 56
                    <select name="change" size="1">
57 57
 <?php
58 58
                     foreach ($category->categories as $cat) {
59
-                       if ($id != $cat["id"]) {
60
-                          printf("<option value=\"%s\">%s</option>", $cat['id'], $cat['name']);
61
-                       }
62
-                   }
59
+                        if ($id != $cat["id"]) {
60
+                            printf("<option value=\"%s\">%s</option>", $cat['id'], $cat['name']);
61
+                        }
62
+                    }
63 63
 ?>
64 64
                     </select>
65 65
                     <?php printf('<p class="help-block">%s</p>', $PMF_LANG['ad_categ_remark_move']); ?>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@
 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
 
Please login to merge, or discard this patch.
phpmyfaq/admin/report.export.php 1 patch
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.
phpmyfaq/admin/trans.list.php 2 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.
phpmyfaq/admin/category.edit.php 1 patch
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.