@@ -975,7 +975,7 @@ |
||
975 | 975 | else |
976 | 976 | { |
977 | 977 | $return = array(); |
978 | - while($row = mysqli_fetch_assoc($request)) |
|
978 | + while ($row = mysqli_fetch_assoc($request)) |
|
979 | 979 | $return[] = $row; |
980 | 980 | } |
981 | 981 | return !empty($return) ? $return : array(); |
@@ -143,7 +143,7 @@ |
||
143 | 143 | |
144 | 144 | // Redirect to the selector if they chose selective. |
145 | 145 | if ($_POST['step2'] == 'selective') |
146 | - redirectexit ('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0'); |
|
146 | + redirectexit('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0'); |
|
147 | 147 | |
148 | 148 | $_POST['at'] = (int) $_POST['at']; |
149 | 149 | $messagesToBeSplit = array(); |
@@ -869,7 +869,6 @@ |
||
869 | 869 | $can_approve_boards = boardsAllowedTo('approve_posts'); |
870 | 870 | $onlyApproved = $can_approve_boards !== array(0) && !in_array($_REQUEST['targetboard'], $can_approve_boards); |
871 | 871 | } |
872 | - |
|
873 | 872 | else |
874 | 873 | $onlyApproved = false; |
875 | 874 |
@@ -619,7 +619,7 @@ |
||
619 | 619 | if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn()) |
620 | 620 | fatal_lang_error('login_ssl_required', false); |
621 | 621 | |
622 | - $password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : ''; |
|
622 | + $password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : ''; |
|
623 | 623 | |
624 | 624 | // You didn't even enter a password! |
625 | 625 | if (trim($password) == '') |
@@ -1257,7 +1257,6 @@ discard block |
||
1257 | 1257 | |
1258 | 1258 | continue; |
1259 | 1259 | } |
1260 | - |
|
1261 | 1260 | else |
1262 | 1261 | { |
1263 | 1262 | $fh = @fopen($path . '/.htaccess', 'w'); |
@@ -1269,7 +1268,6 @@ discard block |
||
1269 | 1268 | Deny from all' . $close); |
1270 | 1269 | fclose($fh); |
1271 | 1270 | } |
1272 | - |
|
1273 | 1271 | else |
1274 | 1272 | $errors[] = 'htaccess_cannot_create_file'; |
1275 | 1273 | } |
@@ -1280,7 +1278,6 @@ discard block |
||
1280 | 1278 | |
1281 | 1279 | continue; |
1282 | 1280 | } |
1283 | - |
|
1284 | 1281 | else |
1285 | 1282 | { |
1286 | 1283 | $fh = @fopen($path . '/index.php', 'w'); |
@@ -1307,7 +1304,6 @@ discard block |
||
1307 | 1304 | ?' . '>'); |
1308 | 1305 | fclose($fh); |
1309 | 1306 | } |
1310 | - |
|
1311 | 1307 | else |
1312 | 1308 | $errors[] = 'index-php_cannot_create_file'; |
1313 | 1309 | } |
@@ -67,8 +67,7 @@ |
||
67 | 67 | $sound_letter = substr($sound_letter, strpos($sound_letter, 'data') + 8); |
68 | 68 | switch ($word[$i] === 's' ? 0 : mt_rand(0, 2)) |
69 | 69 | { |
70 | - case 0 : |
|
71 | - for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++) |
|
70 | + case 0 : for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++) |
|
72 | 71 | for ($k = 0, $m = round(mt_rand(15, 25) / 10); $k < $m; $k++) |
73 | 72 | $sound_word .= $word[$i] === 's' ? $sound_letter[$j] : chr(mt_rand(max(ord($sound_letter[$j]) - 1, 0x00), min(ord($sound_letter[$j]) + 1, 0xFF))); |
74 | 73 | break; |
@@ -310,7 +310,7 @@ |
||
310 | 310 | { |
311 | 311 | /** |
312 | 312 | * Constants for notification types. |
313 | - */ |
|
313 | + */ |
|
314 | 314 | const RECEIVE_NOTIFY_EMAIL = 0x02; |
315 | 315 | const RECEIVE_NOTIFY_ALERT = 0x01; |
316 | 316 |
@@ -97,7 +97,6 @@ discard block |
||
97 | 97 | if ($ts <= 0 || $ts % 15 != 0 || time() - $ts < 0 || time() - $ts > 20) |
98 | 98 | obExit_cron(); |
99 | 99 | } |
100 | - |
|
101 | 100 | else |
102 | 101 | $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0'; |
103 | 102 | |
@@ -323,7 +322,8 @@ discard block |
||
323 | 322 | |
324 | 323 | $message = $txt[$e->getMessage()] ?? $e->getMessage(); |
325 | 324 | |
326 | - if (!empty($modSettings['enableErrorLogging'])) { |
|
325 | + if (!empty($modSettings['enableErrorLogging'])) |
|
326 | + { |
|
327 | 327 | log_error($message, 'cron', $e->getFile(), $e->getLine()); |
328 | 328 | } |
329 | 329 | } |
@@ -644,13 +644,13 @@ discard block |
||
644 | 644 | 'quickbuttons' => array( |
645 | 645 | 'edit' => array( |
646 | 646 | 'label' => $txt['draft_edit'], |
647 | - 'href' => $scripturl.'?action=post;'.(empty($row['id_topic']) ? 'board='.$row['id_board'] : 'topic='.$row['id_topic']).'.0;id_draft='.$row['id_draft'], |
|
647 | + 'href' => $scripturl . '?action=post;' . (empty($row['id_topic']) ? 'board=' . $row['id_board'] : 'topic=' . $row['id_topic']) . '.0;id_draft=' . $row['id_draft'], |
|
648 | 648 | 'icon' => 'modify_button' |
649 | 649 | ), |
650 | 650 | 'delete' => array( |
651 | 651 | 'label' => $txt['draft_delete'], |
652 | - 'href' => $scripturl.'?action=profile;u='.$context['member']['id'].';area=showdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
653 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'"', |
|
652 | + 'href' => $scripturl . '?action=profile;u=' . $context['member']['id'] . ';area=showdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
653 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '"', |
|
654 | 654 | 'class' => 'you_sure', |
655 | 655 | 'icon' => 'remove_button' |
656 | 656 | ), |
@@ -837,13 +837,13 @@ discard block |
||
837 | 837 | 'quickbuttons' => array( |
838 | 838 | 'edit' => array( |
839 | 839 | 'label' => $txt['draft_edit'], |
840 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;id_draft='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
840 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;id_draft=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
841 | 841 | 'icon' => 'modify_button' |
842 | 842 | ), |
843 | 843 | 'delete' => array( |
844 | 844 | 'label' => $txt['draft_delete'], |
845 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
846 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'?"', |
|
845 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
846 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '?"', |
|
847 | 847 | 'class' => 'you_sure', |
848 | 848 | 'icon' => 'remove_button' |
849 | 849 | ), |
@@ -355,8 +355,8 @@ |
||
355 | 355 | elseif (isset($_POST['delall']) && isset($filter)) |
356 | 356 | { |
357 | 357 | // ip need a different placeholder type |
358 | - $filter_type = $filter['variable'] == 'ip'? 'inet' : 'string'; |
|
359 | - $filter_op = $filter['variable'] == 'ip'? '=' : 'LIKE'; |
|
358 | + $filter_type = $filter['variable'] == 'ip' ? 'inet' : 'string'; |
|
359 | + $filter_op = $filter['variable'] == 'ip' ? '=' : 'LIKE'; |
|
360 | 360 | $smcFunc['db_query']('', ' |
361 | 361 | DELETE FROM {db_prefix}log_errors |
362 | 362 | WHERE ' . $filter['variable'] . ' ' . $filter_op . ' {' . $filter_type . ':filter}', |
@@ -320,7 +320,7 @@ |
||
320 | 320 | { |
321 | 321 | // PHPBB 3 check this function exists in PHP 5.5 or higher |
322 | 322 | if (function_exists('password_verify')) |
323 | - $other_passwords[] = password_verify($_POST['passwrd'],$user_settings['password_salt']); |
|
323 | + $other_passwords[] = password_verify($_POST['passwrd'], $user_settings['password_salt']); |
|
324 | 324 | |
325 | 325 | // PHP-Fusion |
326 | 326 | $other_passwords[] = hash_hmac('sha256', $_POST['passwrd'], $user_settings['password_salt']); |
@@ -64,8 +64,7 @@ discard block |
||
64 | 64 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
65 | 65 | && isset($_REQUEST['ajax']) |
66 | 66 | ) |
67 | - ) |
|
68 | - { |
|
67 | + ) { |
|
69 | 68 | $context['from_ajax'] = true; |
70 | 69 | $context['template_layers'] = array(); |
71 | 70 | } |
@@ -137,8 +136,7 @@ discard block |
||
137 | 136 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
138 | 137 | && isset($_REQUEST['ajax']) |
139 | 138 | ) |
140 | - ) |
|
141 | - { |
|
139 | + ) { |
|
142 | 140 | $context['from_ajax'] = true; |
143 | 141 | $context['template_layers'] = array(); |
144 | 142 | } |
@@ -517,8 +515,7 @@ discard block |
||
517 | 515 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
518 | 516 | && isset($_REQUEST['ajax']) |
519 | 517 | ) |
520 | - ) |
|
521 | - { |
|
518 | + ) { |
|
522 | 519 | $context['from_ajax'] = true; |
523 | 520 | $context['template_layers'] = array(); |
524 | 521 | } |