@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | <script> |
| 389 | 389 | function swapPostGroup(isChecked) |
| 390 | 390 | { |
| 391 | - var is_moderator_group = ', (int)$context['is_moderator_group'], '; |
|
| 391 | + var is_moderator_group = ', (int) $context['is_moderator_group'], '; |
|
| 392 | 392 | var group_type = ', $context['group']['type'], '; |
| 393 | 393 | var min_posts_text = document.getElementById(\'min_posts_text\'); |
| 394 | 394 | var group_desc_text = document.getElementById(\'group_desc_text\'); |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | if (empty($modSettings['deny_boards_access'])) |
| 454 | 454 | echo ' |
| 455 | 455 | <li class="category"> |
| 456 | - <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \''.$form_id.'\'); return false;"><strong>', $category['name'], '</strong></a> |
|
| 456 | + <a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'' . $form_id . '\'); return false;"><strong>', $category['name'], '</strong></a> |
|
| 457 | 457 | <ul>'; |
| 458 | 458 | else |
| 459 | 459 | echo ' |
@@ -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(); |
@@ -185,14 +185,14 @@ discard block |
||
| 185 | 185 | $report_buttons = array( |
| 186 | 186 | 'ignore' => array( |
| 187 | 187 | 'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', |
| 188 | - 'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;ignore='.(int) !$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
| 188 | + 'url' => $scripturl . '?action=moderate;area=reportedposts;sa=handle;ignore=' . (int) !$context['report']['ignore'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
| 189 | 189 | 'class' => !$context['report']['ignore'] ? ' you_sure' : '', |
| 190 | 190 | 'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
| 191 | 191 | 'icon' => 'ignore' |
| 192 | 192 | ), |
| 193 | 193 | 'close' => array( |
| 194 | 194 | 'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', |
| 195 | - 'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;closed='.(int) !$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
| 195 | + 'url' => $scripturl . '?action=moderate;area=reportedposts;sa=handle;closed=' . (int) !$context['report']['closed'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
| 196 | 196 | 'icon' => 'close' |
| 197 | 197 | ) |
| 198 | 198 | ); |
@@ -465,14 +465,14 @@ discard block |
||
| 465 | 465 | $report_buttons = array( |
| 466 | 466 | 'ignore' => array( |
| 467 | 467 | 'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', |
| 468 | - 'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;ignore='.(int)!$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
| 468 | + 'url' => $scripturl . '?action=moderate;area=reportedmembers;sa=handle;ignore=' . (int) !$context['report']['ignore'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
| 469 | 469 | 'class' => !$context['report']['ignore'] ? ' you_sure' : '', |
| 470 | 470 | 'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
| 471 | 471 | 'icon' => 'ignore' |
| 472 | 472 | ), |
| 473 | 473 | 'close' => array( |
| 474 | 474 | 'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', |
| 475 | - 'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;closed='.(int)!$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
| 475 | + 'url' => $scripturl . '?action=moderate;area=reportedmembers;sa=handle;closed=' . (int) !$context['report']['closed'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
| 476 | 476 | 'icon' => 'close' |
| 477 | 477 | ) |
| 478 | 478 | ); |
@@ -816,7 +816,7 @@ |
||
| 816 | 816 | |
| 817 | 817 | $out = 'POST /smf/stats/collect_stats.php HTTP/1.1' . "\r\n"; |
| 818 | 818 | $out .= 'Host: www.simplemachines.org' . "\r\n"; |
| 819 | - $out .= 'user-agent: '. SMF_USER_AGENT . "\r\n"; |
|
| 819 | + $out .= 'user-agent: ' . SMF_USER_AGENT . "\r\n"; |
|
| 820 | 820 | $out .= 'content-type: application/x-www-form-urlencoded' . "\r\n"; |
| 821 | 821 | $out .= 'connection: Close' . "\r\n"; |
| 822 | 822 | $out .= 'content-length: ' . $length . "\r\n\r\n"; |
@@ -455,7 +455,7 @@ |
||
| 455 | 455 | |
| 456 | 456 | elseif ($context['uninstalling']) |
| 457 | 457 | echo ' |
| 458 | - ', $txt['package_uninstall_done'] .' <br> |
|
| 458 | + ', $txt['package_uninstall_done'] . ' <br> |
|
| 459 | 459 | ', '<a href="', $context['keep_url'], '" class="button">', $txt['package_keep'], '</a>', '<a href="', $context['remove_url'], '" class="button">', $txt['package_delete2'], '</a>'; |
| 460 | 460 | |
| 461 | 461 | elseif ($context['install_finished']) |
@@ -364,8 +364,8 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | // Clean up tags with children |
| 367 | - foreach($bbcTagsChildren as $parent_tag => $children) |
|
| 368 | - foreach($children as $index => $child_tag) |
|
| 367 | + foreach ($bbcTagsChildren as $parent_tag => $children) |
|
| 368 | + foreach ($children as $index => $child_tag) |
|
| 369 | 369 | { |
| 370 | 370 | // Remove entries where parent and child tag is the same |
| 371 | 371 | if ($child_tag == $parent_tag) |
@@ -1888,25 +1888,25 @@ discard block |
||
| 1888 | 1888 | $fields = array(); |
| 1889 | 1889 | $new_sort = array(); |
| 1890 | 1890 | |
| 1891 | - while($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 1891 | + while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 1892 | 1892 | $fields[] = $row['id_field']; |
| 1893 | 1893 | $smcFunc['db_free_result']($request); |
| 1894 | 1894 | |
| 1895 | 1895 | $idx = array_search($context['fid'], $fields); |
| 1896 | 1896 | |
| 1897 | - if ($_GET['move'] == 'down' && count($fields) - 1 > $idx ) |
|
| 1897 | + if ($_GET['move'] == 'down' && count($fields) - 1 > $idx) |
|
| 1898 | 1898 | { |
| 1899 | - $new_sort = array_slice($fields ,0 ,$idx ,true); |
|
| 1899 | + $new_sort = array_slice($fields, 0, $idx, true); |
|
| 1900 | 1900 | $new_sort[] = $fields[$idx + 1]; |
| 1901 | 1901 | $new_sort[] = $fields[$idx]; |
| 1902 | - $new_sort += array_slice($fields ,$idx + 2 ,count($fields) ,true); |
|
| 1902 | + $new_sort += array_slice($fields, $idx + 2, count($fields), true); |
|
| 1903 | 1903 | } |
| 1904 | 1904 | elseif ($context['fid'] > 0 and $idx < count($fields)) |
| 1905 | 1905 | { |
| 1906 | - $new_sort = array_slice($fields ,0 ,($idx - 1) ,true); |
|
| 1906 | + $new_sort = array_slice($fields, 0, ($idx - 1), true); |
|
| 1907 | 1907 | $new_sort[] = $fields[$idx]; |
| 1908 | 1908 | $new_sort[] = $fields[$idx - 1]; |
| 1909 | - $new_sort += array_slice($fields ,($idx + 1) ,count($fields) ,true); |
|
| 1909 | + $new_sort += array_slice($fields, ($idx + 1), count($fields), true); |
|
| 1910 | 1910 | } |
| 1911 | 1911 | else |
| 1912 | 1912 | redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler |
@@ -393,18 +393,18 @@ discard block |
||
| 393 | 393 | $quickbuttons = array( |
| 394 | 394 | 'approve' => array( |
| 395 | 395 | 'label' => $txt['approve'], |
| 396 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';approve='.$item['id'], |
|
| 396 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';approve=' . $item['id'], |
|
| 397 | 397 | 'icon' => 'approve', |
| 398 | 398 | ), |
| 399 | 399 | 'delete' => array( |
| 400 | 400 | 'label' => $txt['remove'], |
| 401 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';delete='.$item['id'], |
|
| 401 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';delete=' . $item['id'], |
|
| 402 | 402 | 'icon' => 'remove_button', |
| 403 | 403 | 'show' => $item['can_delete'] |
| 404 | 404 | ), |
| 405 | 405 | 'quickmod' => array( |
| 406 | 406 | 'class' => 'inline_mod_check', |
| 407 | - 'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>', |
|
| 407 | + 'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>', |
|
| 408 | 408 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 |
| 409 | 409 | ), |
| 410 | 410 | ); |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | $quickbuttons = array( |
| 470 | 470 | 'delete' => array( |
| 471 | 471 | 'label' => $txt['remove_message'], |
| 472 | - 'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 472 | + 'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 473 | 473 | 'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '"', |
| 474 | 474 | 'class' => 'you_sure', |
| 475 | 475 | 'icon' => 'remove_button', |
@@ -1721,7 +1721,7 @@ discard block |
||
| 1721 | 1721 | { |
| 1722 | 1722 | // Avoid double separators and empty titled sections |
| 1723 | 1723 | $empty_section = true; |
| 1724 | - for ($j=$i+1; $j < count($context['theme_options']); $j++) |
|
| 1724 | + for ($j = $i + 1; $j < count($context['theme_options']); $j++) |
|
| 1725 | 1725 | { |
| 1726 | 1726 | // Found another separator, so we're done |
| 1727 | 1727 | if (!is_array($context['theme_options'][$j])) |
@@ -2700,8 +2700,7 @@ discard block |
||
| 2700 | 2700 | foreach ($context['post_errors'] as $error) |
| 2701 | 2701 | { |
| 2702 | 2702 | $text_key_error = $error == 'password_short' ? |
| 2703 | - sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : |
|
| 2704 | - (isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : ''); |
|
| 2703 | + sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : (isset($txt['profile_error_' . $error]) ? $txt['profile_error_' . $error] : ''); |
|
| 2705 | 2704 | |
| 2706 | 2705 | echo ' |
| 2707 | 2706 | <li>', isset($txt['profile_error_' . $error]) ? $text_key_error : $error, '</li>'; |
@@ -862,7 +862,7 @@ |
||
| 862 | 862 | // Intercept cookie? |
| 863 | 863 | call_integration_hook('integrate_cookie', array($name, $value, $expire, $path, $domain, $secure, $httponly, $samesite)); |
| 864 | 864 | |
| 865 | - if(PHP_VERSION_ID < 70300) |
|
| 865 | + if (PHP_VERSION_ID < 70300) |
|
| 866 | 866 | return setcookie($name, $value, $expire, $path . ';samesite=' . $samesite, $domain, $secure, $httponly); |
| 867 | 867 | else |
| 868 | 868 | return setcookie($name, $value, array( |