@@ -393,17 +393,17 @@ 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 | - 'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>', |
|
406 | + 'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>', |
|
407 | 407 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 |
408 | 408 | ), |
409 | 409 | ); |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | $quickbuttons = array( |
469 | 469 | 'delete' => array( |
470 | 470 | 'label' => $txt['remove_message'], |
471 | - 'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
471 | + 'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
472 | 472 | 'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '" class="you_sure"', |
473 | 473 | 'icon' => 'remove_button', |
474 | 474 | 'show' => $post['can_delete'] |
@@ -645,13 +645,13 @@ discard block |
||
645 | 645 | 'quickbuttons' => array( |
646 | 646 | 'edit' => array( |
647 | 647 | 'label' => $txt['draft_edit'], |
648 | - 'href' => $scripturl.'?action=post;'.(empty($row['id_topic']) ? 'board='.$row['id_board'] : 'topic='.$row['id_topic']).'.0;id_draft='.$row['id_draft'], |
|
648 | + 'href' => $scripturl . '?action=post;' . (empty($row['id_topic']) ? 'board=' . $row['id_board'] : 'topic=' . $row['id_topic']) . '.0;id_draft=' . $row['id_draft'], |
|
649 | 649 | 'icon' => 'modify_button' |
650 | 650 | ), |
651 | 651 | 'delete' => array( |
652 | 652 | 'label' => $txt['draft_delete'], |
653 | - 'href' => $scripturl.'?action=profile;u='.$context['member']['id'].';area=showdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
654 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'" class="you_sure"', |
|
653 | + 'href' => $scripturl . '?action=profile;u=' . $context['member']['id'] . ';area=showdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
654 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '" class="you_sure"', |
|
655 | 655 | 'icon' => 'remove_button' |
656 | 656 | ), |
657 | 657 | ), |
@@ -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'].'?" class="you_sure"', |
|
845 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
846 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '?" class="you_sure"', |
|
847 | 847 | 'icon' => 'remove_button' |
848 | 848 | ), |
849 | 849 | ), |
@@ -93,13 +93,13 @@ discard block |
||
93 | 93 | ), |
94 | 94 | 'ignore' => array( |
95 | 95 | 'label' => $report['ignore'] ? $txt['mc_reportedp_unignore'] : $txt['mc_reportedp_ignore'], |
96 | - 'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;ignore='.(int)!$report['ignore'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
96 | + 'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;ignore=' . (int) !$report['ignore'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
97 | 97 | 'javascript' => !$report['ignore'] ? ' class="you_sure" data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
98 | 98 | 'icon' => 'ignore' |
99 | 99 | ), |
100 | 100 | 'close' => array( |
101 | 101 | 'label' => $context['view_closed'] ? $txt['mc_reportedp_open'] : $txt['mc_reportedp_close'], |
102 | - 'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;closed='.(int)!$report['closed'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
102 | + 'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;closed=' . (int) !$report['closed'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
103 | 103 | 'icon' => $context['view_closed'] ? 'folder' : 'close', |
104 | 104 | ), |
105 | 105 | ); |
@@ -108,17 +108,17 @@ discard block |
||
108 | 108 | if ($context['report_type'] == 'posts') |
109 | 109 | $context['reports'][$key]['quickbuttons']['delete'] = array( |
110 | 110 | 'label' => $txt['mc_reportedp_delete'], |
111 | - 'href' => $scripturl.'?action=deletemsg;topic='.$report['topic']['id'].'.0;msg='.$report['topic']['id_msg'].';modcenter;'.$context['session_var'].'='.$context['session_id'], |
|
112 | - 'javascript' => 'data-confirm="'.$txt['mc_reportedp_delete_confirm'].'" class="you_sure"', |
|
111 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $report['topic']['id'] . '.0;msg=' . $report['topic']['id_msg'] . ';modcenter;' . $context['session_var'] . '=' . $context['session_id'], |
|
112 | + 'javascript' => 'data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '" class="you_sure"', |
|
113 | 113 | 'icon' => 'delete', |
114 | 114 | 'show' => !$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards'])) |
115 | 115 | ); |
116 | 116 | |
117 | 117 | // Ban reported member/post author link |
118 | 118 | if ($context['report_type'] == 'members') |
119 | - $ban_link = $scripturl.'?action=admin;area=ban;sa=add;u='.$report['user']['id'].';'.$context['session_var'].'='.$context['session_id']; |
|
119 | + $ban_link = $scripturl . '?action=admin;area=ban;sa=add;u=' . $report['user']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']; |
|
120 | 120 | else |
121 | - $ban_link = $scripturl.'?action=admin;area=ban;sa=add'.(!empty($report['author']['id']) ? ';u='.$report['author']['id'] : ';msg='.$report['topic']['id_msg']).';'.$context['session_var'].'='.$context['session_id']; |
|
121 | + $ban_link = $scripturl . '?action=admin;area=ban;sa=add' . (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']) . ';' . $context['session_var'] . '=' . $context['session_id']; |
|
122 | 122 | |
123 | 123 | $context['reports'][$key]['quickbuttons'] += array( |
124 | 124 | 'ban' => array( |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | 'show' => !$report['closed'] && !empty($context['report_manage_bans']) && ($context['report_type'] == 'posts' || $context['report_type'] == 'members' && !empty($report['user']['id'])) |
129 | 129 | ), |
130 | 130 | 'quickmod' => array( |
131 | - 'content' => '<input type="checkbox" name="close[]" value="'.$report['id'].'">', |
|
131 | + 'content' => '<input type="checkbox" name="close[]" value="' . $report['id'] . '">', |
|
132 | 132 | 'show' => !$context['view_closed'] |
133 | 133 | ) |
134 | 134 | ); |
@@ -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) == '') |
@@ -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 |
@@ -306,7 +306,6 @@ discard block |
||
306 | 306 | $condition = 'id_member IN ({array_int:members})'; |
307 | 307 | $parameters['members'] = $members; |
308 | 308 | } |
309 | - |
|
310 | 309 | elseif ($members === null) |
311 | 310 | $condition = '1=1'; |
312 | 311 | |
@@ -409,11 +408,9 @@ discard block |
||
409 | 408 | $val = $val . ' END'; |
410 | 409 | $type = 'raw'; |
411 | 410 | } |
412 | - |
|
413 | 411 | else |
414 | 412 | $val = alert_count($members, true); |
415 | 413 | } |
416 | - |
|
417 | 414 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
418 | 415 | { |
419 | 416 | $val = $var . ' ' . $val . ' 1'; |
@@ -2211,7 +2208,7 @@ discard block |
||
2211 | 2208 | 'tag' => 'cowsay', |
2212 | 2209 | 'parameters' => array( |
2213 | 2210 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2214 | - { |
|
2211 | + { |
|
2215 | 2212 | static $css_added; |
2216 | 2213 | |
2217 | 2214 | if (empty($css_added)) |
@@ -2228,7 +2225,7 @@ discard block |
||
2228 | 2225 | }, |
2229 | 2226 | ), |
2230 | 2227 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2231 | - { |
|
2228 | + { |
|
2232 | 2229 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2233 | 2230 | }, |
2234 | 2231 | ), |
@@ -3326,7 +3323,7 @@ discard block |
||
3326 | 3323 | |
3327 | 3324 | // Replace away! |
3328 | 3325 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
3329 | - { |
|
3326 | + { |
|
3330 | 3327 | return $smileyPregReplacements[$matches[1]]; |
3331 | 3328 | }, $message); |
3332 | 3329 | } |
@@ -4113,7 +4110,6 @@ discard block |
||
4113 | 4110 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4114 | 4111 | $minSeed = $js_file['options']['seed']; |
4115 | 4112 | } |
4116 | - |
|
4117 | 4113 | else |
4118 | 4114 | { |
4119 | 4115 | echo ' |
@@ -6295,7 +6291,6 @@ discard block |
||
6295 | 6291 | $isWritable = true; |
6296 | 6292 | break; |
6297 | 6293 | } |
6298 | - |
|
6299 | 6294 | else |
6300 | 6295 | @chmod($file, $val); |
6301 | 6296 | } |
@@ -7227,7 +7222,6 @@ discard block |
||
7227 | 7222 | |
7228 | 7223 | $length += array_length($value, $deep_count); |
7229 | 7224 | } |
7230 | - |
|
7231 | 7225 | else |
7232 | 7226 | $length += strlen($value); |
7233 | 7227 | } |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | { |
405 | 405 | $val = 'CASE '; |
406 | 406 | foreach ($members as $k => $v) |
407 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
407 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
408 | 408 | |
409 | 409 | $val = $val . ' END'; |
410 | 410 | $type = 'raw'; |
@@ -1068,11 +1068,11 @@ discard block |
||
1068 | 1068 | // Anything that isn't a specification, punctuation mark, or whitespace. |
1069 | 1069 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
1070 | 1070 | // A series of punctuation marks (except %), possibly separated by whitespace. |
1071 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1071 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1072 | 1072 | // Unwanted trailing punctuation and whitespace. |
1073 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1073 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1074 | 1074 | // Unwanted opening punctuation and whitespace. |
1075 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1075 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1076 | 1076 | ), |
1077 | 1077 | array( |
1078 | 1078 | '', |
@@ -1479,7 +1479,7 @@ discard block |
||
1479 | 1479 | $width = !empty($width) ? ' width="' . $width . '"' : ''; |
1480 | 1480 | $height = !empty($height) ? ' height="' . $height . '"' : ''; |
1481 | 1481 | |
1482 | - $returnContext .= '<div class="videocontainer"><div><video controls preload="none" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . ' style="object-fit:contain;"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
1482 | + $returnContext .= '<div class="videocontainer"><div><video controls preload="none" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . ' style="object-fit:contain;"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
1483 | 1483 | } |
1484 | 1484 | // Audio. |
1485 | 1485 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1487,7 +1487,7 @@ discard block |
||
1487 | 1487 | $width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
1488 | 1488 | $height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
1489 | 1489 | |
1490 | - $returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="'. $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>'; |
|
1490 | + $returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="' . $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>'; |
|
1491 | 1491 | } |
1492 | 1492 | // Anything else. |
1493 | 1493 | else |
@@ -1650,7 +1650,7 @@ discard block |
||
1650 | 1650 | 'type' => 'unparsed_commas_content', |
1651 | 1651 | 'test' => '\d+,\d+\]', |
1652 | 1652 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1653 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1653 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1654 | 1654 | { |
1655 | 1655 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1656 | 1656 | if (empty($scheme)) |
@@ -2188,7 +2188,7 @@ discard block |
||
2188 | 2188 | $codes[] = array( |
2189 | 2189 | 'tag' => 'cowsay', |
2190 | 2190 | 'parameters' => array( |
2191 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2191 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2192 | 2192 | { |
2193 | 2193 | static $css_added; |
2194 | 2194 | |
@@ -2205,7 +2205,7 @@ discard block |
||
2205 | 2205 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2206 | 2206 | }, |
2207 | 2207 | ), |
2208 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2208 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2209 | 2209 | { |
2210 | 2210 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2211 | 2211 | }, |
@@ -3577,7 +3577,7 @@ discard block |
||
3577 | 3577 | if ($fp != false) |
3578 | 3578 | { |
3579 | 3579 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3580 | - fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: '. SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n"); |
|
3580 | + fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: ' . SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n"); |
|
3581 | 3581 | |
3582 | 3582 | // Read in the HTTP/1.1 or whatever. |
3583 | 3583 | $test = substr(fgets($fp, 11), -1); |
@@ -4178,7 +4178,7 @@ discard block |
||
4178 | 4178 | $toMinify = array(); |
4179 | 4179 | $normal = array(); |
4180 | 4180 | |
4181 | - usort($context['css_files'], function ($a, $b) |
|
4181 | + usort($context['css_files'], function($a, $b) |
|
4182 | 4182 | { |
4183 | 4183 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4184 | 4184 | }); |
@@ -5477,7 +5477,7 @@ discard block |
||
5477 | 5477 | { |
5478 | 5478 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5479 | 5479 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5480 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5480 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5481 | 5481 | if ($keep_alive) |
5482 | 5482 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5483 | 5483 | else |
@@ -5487,7 +5487,7 @@ discard block |
||
5487 | 5487 | { |
5488 | 5488 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5489 | 5489 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5490 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5490 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5491 | 5491 | if ($keep_alive) |
5492 | 5492 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5493 | 5493 | else |
@@ -5643,13 +5643,13 @@ discard block |
||
5643 | 5643 | |
5644 | 5644 | // UTF-8 occurences of MS special characters |
5645 | 5645 | $findchars_utf8 = array( |
5646 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5647 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5648 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5649 | - "\xe2\x80\x98", // left single curly quote |
|
5650 | - "\xe2\x80\x99", // right single curly quote |
|
5651 | - "\xe2\x80\x9c", // left double curly quote |
|
5652 | - "\xe2\x80\x9d", // right double curly quote |
|
5646 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5647 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5648 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5649 | + "\xe2\x80\x98", // left single curly quote |
|
5650 | + "\xe2\x80\x99", // right single curly quote |
|
5651 | + "\xe2\x80\x9c", // left double curly quote |
|
5652 | + "\xe2\x80\x9d", // right double curly quote |
|
5653 | 5653 | ); |
5654 | 5654 | |
5655 | 5655 | // windows 1252 / iso equivalents |
@@ -5665,13 +5665,13 @@ discard block |
||
5665 | 5665 | |
5666 | 5666 | // safe replacements |
5667 | 5667 | $replacechars = array( |
5668 | - ',', // ‚ |
|
5669 | - ',,', // „ |
|
5670 | - '...', // … |
|
5671 | - "'", // ‘ |
|
5672 | - "'", // ’ |
|
5673 | - '"', // “ |
|
5674 | - '"', // ” |
|
5668 | + ',', // ‚ |
|
5669 | + ',,', // „ |
|
5670 | + '...', // … |
|
5671 | + "'", // ‘ |
|
5672 | + "'", // ’ |
|
5673 | + '"', // “ |
|
5674 | + '"', // ” |
|
5675 | 5675 | ); |
5676 | 5676 | |
5677 | 5677 | if ($context['utf8']) |
@@ -6844,7 +6844,7 @@ discard block |
||
6844 | 6844 | EXISTS ( |
6845 | 6845 | SELECT bpv.id_board |
6846 | 6846 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6847 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
6847 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
6848 | 6848 | AND bpv.deny = 0 |
6849 | 6849 | AND bpv.id_board = b.id_board |
6850 | 6850 | )'; |
@@ -6854,7 +6854,7 @@ discard block |
||
6854 | 6854 | AND NOT EXISTS ( |
6855 | 6855 | SELECT bpv.id_board |
6856 | 6856 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6857 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
6857 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
6858 | 6858 | AND bpv.deny = 1 |
6859 | 6859 | AND bpv.id_board = b.id_board |
6860 | 6860 | )'; |
@@ -7125,8 +7125,8 @@ discard block |
||
7125 | 7125 | $i = 0; |
7126 | 7126 | while (empty($done)) |
7127 | 7127 | { |
7128 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7129 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7128 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7129 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7130 | 7130 | else |
7131 | 7131 | $done = true; |
7132 | 7132 | } |
@@ -7136,8 +7136,8 @@ discard block |
||
7136 | 7136 | $i = 0; |
7137 | 7137 | while (empty($done)) |
7138 | 7138 | { |
7139 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7140 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7139 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7140 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7141 | 7141 | else |
7142 | 7142 | $done = true; |
7143 | 7143 | } |
@@ -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 | ) |