@@ -100,18 +100,22 @@ |
||
| 100 | 100 | $tempTab++; |
| 101 | 101 | $context['tabindex'] = $tempTab; |
| 102 | 102 | |
| 103 | - foreach ($context['richedit_buttons'] as $name => $button) { |
|
| 104 | - if ($name == 'spell_check') { |
|
| 103 | + foreach ($context['richedit_buttons'] as $name => $button) |
|
| 104 | + { |
|
| 105 | + if ($name == 'spell_check') |
|
| 106 | + { |
|
| 105 | 107 | $button['onclick'] = 'oEditorHandle_' . $editor_id . '.spellCheckStart();'; |
| 106 | 108 | } |
| 107 | 109 | |
| 108 | - if ($name == 'preview') { |
|
| 110 | + if ($name == 'preview') |
|
| 111 | + { |
|
| 109 | 112 | $button['value'] = isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $button['value']; |
| 110 | 113 | $button['onclick'] = $editor_context['preview_type'] == 2 ? '' : 'return submitThisOnce(this);'; |
| 111 | 114 | $button['show'] = $editor_context['preview_type']; |
| 112 | 115 | } |
| 113 | 116 | |
| 114 | - if ($button['show']) { |
|
| 117 | + if ($button['show']) |
|
| 118 | + { |
|
| 115 | 119 | echo ' |
| 116 | 120 | <input type="', $button['type'], '"', $button['type'] == 'hidden' ? ' id="' . $name . '"' : '', ' name="', $name, '" value="', $button['value'], '"', $button['type'] != 'hidden' ? ' tabindex="' . --$tempTab . '"' : '', !empty($button['onclick']) ? ' onclick="' . $button['onclick'] . '"' : '', !empty($button['accessKey']) ? ' accesskey="' . $button['accessKey'] . '"' : '', $button['type'] != 'hidden' ? ' class="button"' : '', '>'; |
| 117 | 121 | } |
@@ -978,7 +978,7 @@ |
||
| 978 | 978 | { |
| 979 | 979 | $row = $smcFunc['db_fetch_assoc']($result); |
| 980 | 980 | if ($row['standard_conforming_strings'] !== 'on') |
| 981 | - { |
|
| 981 | + { |
|
| 982 | 982 | $incontext['continue'] = 0; |
| 983 | 983 | $incontext['error'] = $txt['error_pg_scs']; |
| 984 | 984 | } |
@@ -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 | |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])])); |
| 501 | 501 | |
| 502 | 502 | $context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set) |
| 503 | - { |
|
| 503 | + { |
|
| 504 | 504 | return $v != $set; |
| 505 | 505 | }); |
| 506 | 506 | } |
@@ -3493,7 +3493,6 @@ discard block |
||
| 3493 | 3493 | } |
| 3494 | 3494 | } |
| 3495 | 3495 | } |
| 3496 | - |
|
| 3497 | 3496 | elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar) |
| 3498 | 3497 | { |
| 3499 | 3498 | if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar) |
@@ -1213,7 +1213,8 @@ discard block |
||
| 1213 | 1213 | } |
| 1214 | 1214 | |
| 1215 | 1215 | // It's important to do the numbered ones before the named ones, or messes happen. |
| 1216 | - uksort($substitutions, function($a, $b) { |
|
| 1216 | + uksort($substitutions, function($a, $b) |
|
| 1217 | + { |
|
| 1217 | 1218 | if (is_int($a) && is_int($b)) |
| 1218 | 1219 | return $a > $b; |
| 1219 | 1220 | elseif (is_int($a)) |
@@ -1752,8 +1753,12 @@ discard block |
||
| 1752 | 1753 | unset($mtime, $settingsFile, $settingsText); |
| 1753 | 1754 | $defined_vars = get_defined_vars(); |
| 1754 | 1755 | } |
| 1755 | - catch (Throwable $e) {} |
|
| 1756 | - catch (ErrorException $e) {} |
|
| 1756 | + catch (Throwable $e) |
|
| 1757 | + { |
|
| 1758 | +} |
|
| 1759 | + catch (ErrorException $e) |
|
| 1760 | + { |
|
| 1761 | +} |
|
| 1757 | 1762 | if (isset($e)) |
| 1758 | 1763 | return false; |
| 1759 | 1764 | |
@@ -1913,7 +1918,8 @@ discard block |
||
| 1913 | 1918 | // For the same reason, replace literal returns and newlines with "\r" and "\n" |
| 1914 | 1919 | elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false)) |
| 1915 | 1920 | { |
| 1916 | - return strtr(preg_replace_callback('/[\r\n]+/', function($m) { |
|
| 1921 | + return strtr(preg_replace_callback('/[\r\n]+/', function($m) |
|
| 1922 | + { |
|
| 1917 | 1923 | return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \''; |
| 1918 | 1924 | }, $var), array("'' . " => '', " . ''" => '')); |
| 1919 | 1925 | } |
@@ -926,7 +926,8 @@ discard block |
||
| 926 | 926 | $error_array[2] = null; |
| 927 | 927 | |
| 928 | 928 | if(empty($db_persist)) |
| 929 | - { // without pooling |
|
| 929 | + { |
|
| 930 | +// without pooling |
|
| 930 | 931 | if (empty($pg_error_data_prep)) |
| 931 | 932 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
| 932 | 933 | 'INSERT INTO ' . $db_prefix . 'log_errors |
@@ -937,7 +938,8 @@ discard block |
||
| 937 | 938 | pg_execute($db_connection, 'smf_log_errors', $error_array); |
| 938 | 939 | } |
| 939 | 940 | else |
| 940 | - { //with pooling |
|
| 941 | + { |
|
| 942 | +//with pooling |
|
| 941 | 943 | $pg_error_data_prep = pg_prepare($db_connection, '', |
| 942 | 944 | 'INSERT INTO ' . $db_prefix . 'log_errors |
| 943 | 945 | (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace) |
@@ -267,7 +267,6 @@ |
||
| 267 | 267 | $user_info = $real_user_info; |
| 268 | 268 | unset($real_user_info); |
| 269 | 269 | } |
| 270 | - |
|
| 271 | 270 | else |
| 272 | 271 | $user_info = null; |
| 273 | 272 | |
@@ -93,7 +93,6 @@ |
||
| 93 | 93 | if ($ts <= 0 || $ts % 15 != 0 || time() - $ts < 0 || time() - $ts > 20) |
| 94 | 94 | obExit_cron(); |
| 95 | 95 | } |
| 96 | - |
|
| 97 | 96 | else |
| 98 | 97 | $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0'; |
| 99 | 98 | |
@@ -2167,7 +2167,8 @@ |
||
| 2167 | 2167 | // Sort the attachments by size to make things easier below |
| 2168 | 2168 | if (!empty($loaded_attachments)) |
| 2169 | 2169 | { |
| 2170 | - uasort($loaded_attachments, function($a, $b) { |
|
| 2170 | + uasort($loaded_attachments, function($a, $b) |
|
| 2171 | + { |
|
| 2171 | 2172 | if ($a['filesize'] == $b['filesize']) |
| 2172 | 2173 | return 0; |
| 2173 | 2174 | return ($a['filesize'] < $b['filesize']) ? -1 : 1; |