@@ -1155,7 +1155,7 @@ |
||
| 1155 | 1155 | // We're really just checking for entries which are create table AND add columns (etc). |
| 1156 | 1156 | $tables = array(); |
| 1157 | 1157 | |
| 1158 | - usort($db_package_log, function ($a, $b) |
|
| 1158 | + usort($db_package_log, function($a, $b) |
|
| 1159 | 1159 | { |
| 1160 | 1160 | if ($a[0] == $b[0]) |
| 1161 | 1161 | return 0; |
@@ -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 | } |
@@ -7082,32 +7082,32 @@ discard block |
||
| 7082 | 7082 | */ |
| 7083 | 7083 | function truncate_array($array, $max_length = 1900, $deep = 3) |
| 7084 | 7084 | { |
| 7085 | - $array = (array) $array; |
|
| 7085 | + $array = (array) $array; |
|
| 7086 | 7086 | |
| 7087 | - $curr_length = array_length($array, $deep); |
|
| 7087 | + $curr_length = array_length($array, $deep); |
|
| 7088 | 7088 | |
| 7089 | - if ($curr_length <= $max_length) |
|
| 7090 | - return $array; |
|
| 7089 | + if ($curr_length <= $max_length) |
|
| 7090 | + return $array; |
|
| 7091 | 7091 | |
| 7092 | - else |
|
| 7093 | - { |
|
| 7094 | - // Truncate each element's value to a reasonable length |
|
| 7095 | - $param_max = floor($max_length / count($array)); |
|
| 7092 | + else |
|
| 7093 | + { |
|
| 7094 | + // Truncate each element's value to a reasonable length |
|
| 7095 | + $param_max = floor($max_length / count($array)); |
|
| 7096 | 7096 | |
| 7097 | - $current_deep = $deep - 1; |
|
| 7097 | + $current_deep = $deep - 1; |
|
| 7098 | 7098 | |
| 7099 | - foreach ($array as $key => &$value) |
|
| 7100 | - { |
|
| 7101 | - if (is_array($value)) |
|
| 7102 | - if ($current_deep > 0) |
|
| 7103 | - $value = truncate_array($value, $current_deep); |
|
| 7099 | + foreach ($array as $key => &$value) |
|
| 7100 | + { |
|
| 7101 | + if (is_array($value)) |
|
| 7102 | + if ($current_deep > 0) |
|
| 7103 | + $value = truncate_array($value, $current_deep); |
|
| 7104 | 7104 | |
| 7105 | - else |
|
| 7106 | - $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7107 | - } |
|
| 7105 | + else |
|
| 7106 | + $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7107 | + } |
|
| 7108 | 7108 | |
| 7109 | - return $array; |
|
| 7110 | - } |
|
| 7109 | + return $array; |
|
| 7110 | + } |
|
| 7111 | 7111 | } |
| 7112 | 7112 | |
| 7113 | 7113 | /** |
@@ -7118,29 +7118,29 @@ discard block |
||
| 7118 | 7118 | */ |
| 7119 | 7119 | function array_length($array, $deep = 3) |
| 7120 | 7120 | { |
| 7121 | - // Work with arrays |
|
| 7122 | - $array = (array) $array; |
|
| 7123 | - $length = 0; |
|
| 7121 | + // Work with arrays |
|
| 7122 | + $array = (array) $array; |
|
| 7123 | + $length = 0; |
|
| 7124 | 7124 | |
| 7125 | - $deep_count = $deep - 1; |
|
| 7125 | + $deep_count = $deep - 1; |
|
| 7126 | 7126 | |
| 7127 | - foreach ($array as $value) |
|
| 7128 | - { |
|
| 7129 | - // Recursive? |
|
| 7130 | - if (is_array($value)) |
|
| 7131 | - { |
|
| 7132 | - // No can't do |
|
| 7133 | - if ($deep_count <= 0) |
|
| 7134 | - continue; |
|
| 7127 | + foreach ($array as $value) |
|
| 7128 | + { |
|
| 7129 | + // Recursive? |
|
| 7130 | + if (is_array($value)) |
|
| 7131 | + { |
|
| 7132 | + // No can't do |
|
| 7133 | + if ($deep_count <= 0) |
|
| 7134 | + continue; |
|
| 7135 | 7135 | |
| 7136 | - $length += array_length($value, $deep_count); |
|
| 7137 | - } |
|
| 7136 | + $length += array_length($value, $deep_count); |
|
| 7137 | + } |
|
| 7138 | 7138 | |
| 7139 | - else |
|
| 7140 | - $length += strlen($value); |
|
| 7141 | - } |
|
| 7139 | + else |
|
| 7140 | + $length += strlen($value); |
|
| 7141 | + } |
|
| 7142 | 7142 | |
| 7143 | - return $length; |
|
| 7143 | + return $length; |
|
| 7144 | 7144 | } |
| 7145 | 7145 | |
| 7146 | 7146 | ?> |
| 7147 | 7147 | \ No newline at end of file |
@@ -302,7 +302,6 @@ discard block |
||
| 302 | 302 | $condition = 'id_member IN ({array_int:members})'; |
| 303 | 303 | $parameters['members'] = $members; |
| 304 | 304 | } |
| 305 | - |
|
| 306 | 305 | elseif ($members === null) |
| 307 | 306 | $condition = '1=1'; |
| 308 | 307 | |
@@ -2156,7 +2155,7 @@ discard block |
||
| 2156 | 2155 | 'tag' => 'cowsay', |
| 2157 | 2156 | 'parameters' => array( |
| 2158 | 2157 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
| 2159 | - { |
|
| 2158 | + { |
|
| 2160 | 2159 | static $css_added; |
| 2161 | 2160 | |
| 2162 | 2161 | if (empty($css_added)) |
@@ -2173,7 +2172,7 @@ discard block |
||
| 2173 | 2172 | }, |
| 2174 | 2173 | ), |
| 2175 | 2174 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
| 2176 | - { |
|
| 2175 | + { |
|
| 2177 | 2176 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2178 | 2177 | }, |
| 2179 | 2178 | ), |
@@ -3280,7 +3279,7 @@ discard block |
||
| 3280 | 3279 | |
| 3281 | 3280 | // Replace away! |
| 3282 | 3281 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
| 3283 | - { |
|
| 3282 | + { |
|
| 3284 | 3283 | return $smileyPregReplacements[$matches[1]]; |
| 3285 | 3284 | }, $message); |
| 3286 | 3285 | } |
@@ -4067,7 +4066,6 @@ discard block |
||
| 4067 | 4066 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
| 4068 | 4067 | $minSeed = $js_file['options']['seed']; |
| 4069 | 4068 | } |
| 4070 | - |
|
| 4071 | 4069 | else |
| 4072 | 4070 | { |
| 4073 | 4071 | echo ' |
@@ -6255,7 +6253,6 @@ discard block |
||
| 6255 | 6253 | $isWritable = true; |
| 6256 | 6254 | break; |
| 6257 | 6255 | } |
| 6258 | - |
|
| 6259 | 6256 | else |
| 6260 | 6257 | @chmod($file, $val); |
| 6261 | 6258 | } |
@@ -7135,7 +7132,6 @@ discard block |
||
| 7135 | 7132 | |
| 7136 | 7133 | $length += array_length($value, $deep_count); |
| 7137 | 7134 | } |
| 7138 | - |
|
| 7139 | 7135 | else |
| 7140 | 7136 | $length += strlen($value); |
| 7141 | 7137 | } |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | { |
| 396 | 396 | $val = 'CASE '; |
| 397 | 397 | foreach ($members as $k => $v) |
| 398 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
| 398 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
| 399 | 399 | $val = $val . ' END'; |
| 400 | 400 | $type = 'raw'; |
| 401 | 401 | } |
@@ -1055,11 +1055,11 @@ discard block |
||
| 1055 | 1055 | // Anything that isn't a specification, punctuation mark, or whitespace. |
| 1056 | 1056 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
| 1057 | 1057 | // A series of punctuation marks (except %), possibly separated by whitespace. |
| 1058 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
| 1058 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
| 1059 | 1059 | // Unwanted trailing punctuation and whitespace. |
| 1060 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
| 1060 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
| 1061 | 1061 | // Unwanted opening punctuation and whitespace. |
| 1062 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
| 1062 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
| 1063 | 1063 | ), |
| 1064 | 1064 | array( |
| 1065 | 1065 | '', |
@@ -1599,7 +1599,7 @@ discard block |
||
| 1599 | 1599 | 'type' => 'unparsed_commas_content', |
| 1600 | 1600 | 'test' => '\d+,\d+\]', |
| 1601 | 1601 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
| 1602 | - 'validate' => function (&$tag, &$data, $disabled) |
|
| 1602 | + 'validate' => function(&$tag, &$data, $disabled) |
|
| 1603 | 1603 | { |
| 1604 | 1604 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
| 1605 | 1605 | if (empty($scheme)) |
@@ -2159,7 +2159,7 @@ discard block |
||
| 2159 | 2159 | $codes[] = array( |
| 2160 | 2160 | 'tag' => 'cowsay', |
| 2161 | 2161 | 'parameters' => array( |
| 2162 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
| 2162 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
| 2163 | 2163 | { |
| 2164 | 2164 | static $css_added; |
| 2165 | 2165 | |
@@ -2176,7 +2176,7 @@ discard block |
||
| 2176 | 2176 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
| 2177 | 2177 | }, |
| 2178 | 2178 | ), |
| 2179 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
| 2179 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
| 2180 | 2180 | { |
| 2181 | 2181 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2182 | 2182 | }, |
@@ -4140,7 +4140,7 @@ discard block |
||
| 4140 | 4140 | $toMinify = array(); |
| 4141 | 4141 | $normal = array(); |
| 4142 | 4142 | |
| 4143 | - usort($context['css_files'], function ($a, $b) |
|
| 4143 | + usort($context['css_files'], function($a, $b) |
|
| 4144 | 4144 | { |
| 4145 | 4145 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
| 4146 | 4146 | }); |
@@ -5605,13 +5605,13 @@ discard block |
||
| 5605 | 5605 | |
| 5606 | 5606 | // UTF-8 occurences of MS special characters |
| 5607 | 5607 | $findchars_utf8 = array( |
| 5608 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
| 5609 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
| 5610 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
| 5611 | - "\xe2\x80\x98", // left single curly quote |
|
| 5612 | - "\xe2\x80\x99", // right single curly quote |
|
| 5613 | - "\xe2\x80\x9c", // left double curly quote |
|
| 5614 | - "\xe2\x80\x9d", // right double curly quote |
|
| 5608 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
| 5609 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
| 5610 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
| 5611 | + "\xe2\x80\x98", // left single curly quote |
|
| 5612 | + "\xe2\x80\x99", // right single curly quote |
|
| 5613 | + "\xe2\x80\x9c", // left double curly quote |
|
| 5614 | + "\xe2\x80\x9d", // right double curly quote |
|
| 5615 | 5615 | ); |
| 5616 | 5616 | |
| 5617 | 5617 | // windows 1252 / iso equivalents |
@@ -5627,13 +5627,13 @@ discard block |
||
| 5627 | 5627 | |
| 5628 | 5628 | // safe replacements |
| 5629 | 5629 | $replacechars = array( |
| 5630 | - ',', // ‚ |
|
| 5631 | - ',,', // „ |
|
| 5632 | - '...', // … |
|
| 5633 | - "'", // ‘ |
|
| 5634 | - "'", // ’ |
|
| 5635 | - '"', // “ |
|
| 5636 | - '"', // ” |
|
| 5630 | + ',', // ‚ |
|
| 5631 | + ',,', // „ |
|
| 5632 | + '...', // … |
|
| 5633 | + "'", // ‘ |
|
| 5634 | + "'", // ’ |
|
| 5635 | + '"', // “ |
|
| 5636 | + '"', // ” |
|
| 5637 | 5637 | ); |
| 5638 | 5638 | |
| 5639 | 5639 | if ($context['utf8']) |
@@ -6800,7 +6800,7 @@ discard block |
||
| 6800 | 6800 | EXISTS ( |
| 6801 | 6801 | SELECT bpv.id_board |
| 6802 | 6802 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
| 6803 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
| 6803 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
| 6804 | 6804 | AND bpv.deny = 0 |
| 6805 | 6805 | AND bpv.id_board = b.id_board |
| 6806 | 6806 | )'; |
@@ -6810,7 +6810,7 @@ discard block |
||
| 6810 | 6810 | AND NOT EXISTS ( |
| 6811 | 6811 | SELECT bpv.id_board |
| 6812 | 6812 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
| 6813 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
| 6813 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
| 6814 | 6814 | AND bpv.deny = 1 |
| 6815 | 6815 | AND bpv.id_board = b.id_board |
| 6816 | 6816 | )'; |
@@ -7081,8 +7081,8 @@ discard block |
||
| 7081 | 7081 | $i = 0; |
| 7082 | 7082 | while (empty($done)) |
| 7083 | 7083 | { |
| 7084 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
| 7085 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
| 7084 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
| 7085 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
| 7086 | 7086 | else |
| 7087 | 7087 | $done = true; |
| 7088 | 7088 | } |
@@ -7092,8 +7092,8 @@ discard block |
||
| 7092 | 7092 | $i = 0; |
| 7093 | 7093 | while (empty($done)) |
| 7094 | 7094 | { |
| 7095 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
| 7096 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
| 7095 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
| 7096 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
| 7097 | 7097 | else |
| 7098 | 7098 | $done = true; |
| 7099 | 7099 | } |
@@ -1707,7 +1707,7 @@ |
||
| 1707 | 1707 | { |
| 1708 | 1708 | // Avoid double separators and empty titled sections |
| 1709 | 1709 | $empty_section = true; |
| 1710 | - for ($j=$i+1; $j < count($context['theme_options']); $j++) |
|
| 1710 | + for ($j = $i + 1; $j < count($context['theme_options']); $j++) |
|
| 1711 | 1711 | { |
| 1712 | 1712 | // Found another separator, so we're done |
| 1713 | 1713 | if (!is_array($context['theme_options'][$j])) |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | AND a.is_read = 0' : '') . (!empty($alertIDs) ? ' |
| 263 | 263 | AND a.id_alert IN ({array_int:alertIDs})' : '') . ' |
| 264 | 264 | ORDER BY id_alert DESC' . (!empty($limit) ? ' |
| 265 | - LIMIT {int:limit}' : '') . (!empty($offset) ?' |
|
| 265 | + LIMIT {int:limit}' : '') . (!empty($offset) ? ' |
|
| 266 | 266 | OFFSET {int:offset}' : ''), |
| 267 | 267 | array( |
| 268 | 268 | 'id_member' => $memID, |
@@ -1101,20 +1101,20 @@ discard block |
||
| 1101 | 1101 | $context['posts'][$key]['quickbuttons'] = array( |
| 1102 | 1102 | 'reply' => array( |
| 1103 | 1103 | 'label' => $txt['reply'], |
| 1104 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
| 1104 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
| 1105 | 1105 | 'icon' => 'reply_button', |
| 1106 | 1106 | 'show' => $post['can_reply'] |
| 1107 | 1107 | ), |
| 1108 | 1108 | 'quote' => array( |
| 1109 | 1109 | 'label' => $txt['quote_action'], |
| 1110 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
| 1110 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
| 1111 | 1111 | 'icon' => 'quote', |
| 1112 | 1112 | 'show' => $post['can_quote'] |
| 1113 | 1113 | ), |
| 1114 | 1114 | 'remove' => array( |
| 1115 | 1115 | 'label' => $txt['remove'], |
| 1116 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1117 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"', |
|
| 1116 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1117 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"', |
|
| 1118 | 1118 | 'icon' => 'remove_button', |
| 1119 | 1119 | 'show' => $post['can_delete'] |
| 1120 | 1120 | ) |
@@ -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 | } |
@@ -959,7 +959,7 @@ |
||
| 959 | 959 | $incontext['continue'] = 1; |
| 960 | 960 | |
| 961 | 961 | // Check Postgres setting |
| 962 | - if ( $db_type === 'postgresql') |
|
| 962 | + if ($db_type === 'postgresql') |
|
| 963 | 963 | { |
| 964 | 964 | load_database(); |
| 965 | 965 | $result = $smcFunc['db_query']('', ' |
@@ -973,7 +973,7 @@ |
||
| 973 | 973 | { |
| 974 | 974 | $row = $smcFunc['db_fetch_assoc']($result); |
| 975 | 975 | if ($row['standard_conforming_strings'] !== 'on') |
| 976 | - { |
|
| 976 | + { |
|
| 977 | 977 | $incontext['continue'] = 0; |
| 978 | 978 | $incontext['error'] = $txt['error_pg_scs']; |
| 979 | 979 | } |
@@ -1631,14 +1631,14 @@ discard block |
||
| 1631 | 1631 | $output['quickbuttons'] = array( |
| 1632 | 1632 | 'quote' => array( |
| 1633 | 1633 | 'label' => $txt['quote_action'], |
| 1634 | - 'href' => $scripturl.'?action=post;quote='.$output['id'].';topic='.$context['current_topic'], '.'.$context['start'].';last_msg='.$context['topic_last_message'], |
|
| 1635 | - 'javascript' => 'onclick="return oQuickReply.quote('.$output['id'].');"', |
|
| 1634 | + 'href' => $scripturl . '?action=post;quote=' . $output['id'] . ';topic=' . $context['current_topic'], '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], |
|
| 1635 | + 'javascript' => 'onclick="return oQuickReply.quote(' . $output['id'] . ');"', |
|
| 1636 | 1636 | 'icon' => 'quote', |
| 1637 | 1637 | 'show' => $context['can_quote'] |
| 1638 | 1638 | ), |
| 1639 | 1639 | 'quote_selected' => array( |
| 1640 | 1640 | 'label' => $txt['quote_selected_action'], |
| 1641 | - 'id' => 'quoteSelected_'. $output['id'], |
|
| 1641 | + 'id' => 'quoteSelected_' . $output['id'], |
|
| 1642 | 1642 | 'href' => 'javascript:void(0)', |
| 1643 | 1643 | 'custom' => 'style="display:none"', |
| 1644 | 1644 | 'icon' => 'quote_selected', |
@@ -1647,71 +1647,71 @@ discard block |
||
| 1647 | 1647 | 'quick_edit' => array( |
| 1648 | 1648 | 'label' => $txt['quick_edit'], |
| 1649 | 1649 | 'class' => 'quick_edit', |
| 1650 | - 'id' =>' modify_button_'. $output['id'], |
|
| 1651 | - 'custom' => 'onclick="oQuickModify.modifyMsg(\''.$output['id'].'\', \''.!empty($modSettings['toggle_subject']).'\')"', |
|
| 1650 | + 'id' =>' modify_button_' . $output['id'], |
|
| 1651 | + 'custom' => 'onclick="oQuickModify.modifyMsg(\'' . $output['id'] . '\', \'' . !empty($modSettings['toggle_subject']) . '\')"', |
|
| 1652 | 1652 | 'icon' => 'quick_edit_button', |
| 1653 | 1653 | 'show' => $output['can_modify'] |
| 1654 | 1654 | ), |
| 1655 | 1655 | 'more' => array( |
| 1656 | 1656 | 'modify' => array( |
| 1657 | 1657 | 'label' => $txt['modify'], |
| 1658 | - 'href' => $scripturl.'?action=post;msg='.$output['id'].';topic='.$context['current_topic'].'.'.$context['start'], |
|
| 1658 | + 'href' => $scripturl . '?action=post;msg=' . $output['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'], |
|
| 1659 | 1659 | 'icon' => 'modify_button', |
| 1660 | 1660 | 'show' => $output['can_modify'] |
| 1661 | 1661 | ), |
| 1662 | 1662 | 'remove_topic' => array( |
| 1663 | 1663 | 'label' => $txt['remove_topic'], |
| 1664 | - 'href' => $scripturl.'?action=removetopic2;topic='.$context['current_topic'].'.'.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1665 | - 'javascript' => 'data-confirm="'.$txt['are_sure_remove_topic'].'" class="you_sure"', |
|
| 1664 | + 'href' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1665 | + 'javascript' => 'data-confirm="' . $txt['are_sure_remove_topic'] . '" class="you_sure"', |
|
| 1666 | 1666 | 'icon' => 'remove_button', |
| 1667 | 1667 | 'show' => $context['can_delete'] && ($context['topic_first_message'] == $output['id']) |
| 1668 | 1668 | ), |
| 1669 | 1669 | 'remove' => array( |
| 1670 | 1670 | 'label' => $txt['remove'], |
| 1671 | - 'href' => $scripturl.'?action=deletemsg;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1672 | - 'javascript' => 'data-confirm="'.$txt['remove_message_question'].'" class="you_sure"', |
|
| 1671 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1672 | + 'javascript' => 'data-confirm="' . $txt['remove_message_question'] . '" class="you_sure"', |
|
| 1673 | 1673 | 'icon' => 'remove_button', |
| 1674 | 1674 | 'show' => $output['can_remove'] && ($context['topic_first_message'] != $output['id']) |
| 1675 | 1675 | ), |
| 1676 | 1676 | 'split' => array( |
| 1677 | 1677 | 'label' => $txt['split'], |
| 1678 | - 'href' => $scripturl.'?action=splittopics;topic='.$context['current_topic'].'.0;at='.$output['id'], |
|
| 1678 | + 'href' => $scripturl . '?action=splittopics;topic=' . $context['current_topic'] . '.0;at=' . $output['id'], |
|
| 1679 | 1679 | 'icon' => 'split_button', |
| 1680 | 1680 | 'show' => $context['can_split'] && !empty($context['real_num_replies']) |
| 1681 | 1681 | ), |
| 1682 | 1682 | 'report' => array( |
| 1683 | 1683 | 'label' => $txt['report_to_mod'], |
| 1684 | - 'href' => $scripturl.'?action=reporttm;topic='.$context['current_topic'].'.'.$output['counter'].';msg='.$output['id'], |
|
| 1684 | + 'href' => $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $output['counter'] . ';msg=' . $output['id'], |
|
| 1685 | 1685 | 'icon' => 'error', |
| 1686 | 1686 | 'show' => $context['can_report_moderator'] |
| 1687 | 1687 | ), |
| 1688 | 1688 | 'warn' => array( |
| 1689 | 1689 | 'label' => $txt['issue_warning'], |
| 1690 | - 'href' => $scripturl.'?action=profile;area=issuewarning;u='.$output['member']['id'].';msg='.$output['id'], |
|
| 1690 | + 'href' => $scripturl . '?action=profile;area=issuewarning;u=' . $output['member']['id'] . ';msg=' . $output['id'], |
|
| 1691 | 1691 | 'icon' => 'warn_button', |
| 1692 | 1692 | 'show' => $context['can_issue_warning'] && !$output['is_message_author'] && !$output['member']['is_guest'] |
| 1693 | 1693 | ), |
| 1694 | 1694 | 'restore' => array( |
| 1695 | 1695 | 'label' => $txt['restore_message'], |
| 1696 | - 'href' => $scripturl.'?action=restoretopic;msgs='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1696 | + 'href' => $scripturl . '?action=restoretopic;msgs=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1697 | 1697 | 'icon' => 'restore_button', |
| 1698 | 1698 | 'show' => $context['can_restore_msg'] |
| 1699 | 1699 | ), |
| 1700 | 1700 | 'approve' => array( |
| 1701 | 1701 | 'label' => $txt['approve'], |
| 1702 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1702 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1703 | 1703 | 'icon' => 'approve_button', |
| 1704 | 1704 | 'show' => $output['can_approve'] |
| 1705 | 1705 | ), |
| 1706 | 1706 | 'unapprove' => array( |
| 1707 | 1707 | 'label' => $txt['unapprove'], |
| 1708 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1708 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1709 | 1709 | 'icon' => 'unapprove_button', |
| 1710 | 1710 | 'show' => $output['can_unapprove'] |
| 1711 | 1711 | ), |
| 1712 | 1712 | ), |
| 1713 | 1713 | 'quickmod' => array( |
| 1714 | - 'id' => 'in_topic_mod_check_'. $output['id'], |
|
| 1714 | + 'id' => 'in_topic_mod_check_' . $output['id'], |
|
| 1715 | 1715 | 'custom' => 'style="display: none;"', |
| 1716 | 1716 | 'content' => '', |
| 1717 | 1717 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $output['can_remove'], |