@@ -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) == '') |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | AND a.is_read = 0' : '') . (!empty($alertIDs) ? ' |
262 | 262 | AND a.id_alert IN ({array_int:alertIDs})' : '') . ' |
263 | 263 | ORDER BY id_alert DESC' . (!empty($limit) ? ' |
264 | - LIMIT {int:limit}' : '') . (!empty($offset) ?' |
|
264 | + LIMIT {int:limit}' : '') . (!empty($offset) ? ' |
|
265 | 265 | OFFSET {int:offset}' : ''), |
266 | 266 | array( |
267 | 267 | 'id_member' => $memID, |
@@ -1108,20 +1108,20 @@ discard block |
||
1108 | 1108 | $context['posts'][$key]['quickbuttons'] = array( |
1109 | 1109 | 'reply' => array( |
1110 | 1110 | 'label' => $txt['reply'], |
1111 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
1111 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
1112 | 1112 | 'icon' => 'reply_button', |
1113 | 1113 | 'show' => $post['can_reply'] |
1114 | 1114 | ), |
1115 | 1115 | 'quote' => array( |
1116 | 1116 | 'label' => $txt['quote_action'], |
1117 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
1117 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
1118 | 1118 | 'icon' => 'quote', |
1119 | 1119 | 'show' => $post['can_quote'] |
1120 | 1120 | ), |
1121 | 1121 | 'remove' => array( |
1122 | 1122 | 'label' => $txt['remove'], |
1123 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
1124 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"', |
|
1123 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1124 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"', |
|
1125 | 1125 | 'icon' => 'remove_button', |
1126 | 1126 | 'show' => $post['can_delete'] |
1127 | 1127 | ) |
@@ -7116,32 +7116,32 @@ discard block |
||
7116 | 7116 | */ |
7117 | 7117 | function truncate_array($array, $max_length = 1900, $deep = 3) |
7118 | 7118 | { |
7119 | - $array = (array) $array; |
|
7119 | + $array = (array) $array; |
|
7120 | 7120 | |
7121 | - $curr_length = array_length($array, $deep); |
|
7121 | + $curr_length = array_length($array, $deep); |
|
7122 | 7122 | |
7123 | - if ($curr_length <= $max_length) |
|
7124 | - return $array; |
|
7123 | + if ($curr_length <= $max_length) |
|
7124 | + return $array; |
|
7125 | 7125 | |
7126 | - else |
|
7127 | - { |
|
7128 | - // Truncate each element's value to a reasonable length |
|
7129 | - $param_max = floor($max_length / count($array)); |
|
7126 | + else |
|
7127 | + { |
|
7128 | + // Truncate each element's value to a reasonable length |
|
7129 | + $param_max = floor($max_length / count($array)); |
|
7130 | 7130 | |
7131 | - $current_deep = $deep - 1; |
|
7131 | + $current_deep = $deep - 1; |
|
7132 | 7132 | |
7133 | - foreach ($array as $key => &$value) |
|
7134 | - { |
|
7135 | - if (is_array($value)) |
|
7136 | - if ($current_deep > 0) |
|
7137 | - $value = truncate_array($value, $current_deep); |
|
7133 | + foreach ($array as $key => &$value) |
|
7134 | + { |
|
7135 | + if (is_array($value)) |
|
7136 | + if ($current_deep > 0) |
|
7137 | + $value = truncate_array($value, $current_deep); |
|
7138 | 7138 | |
7139 | - else |
|
7140 | - $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
7141 | - } |
|
7139 | + else |
|
7140 | + $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
7141 | + } |
|
7142 | 7142 | |
7143 | - return $array; |
|
7144 | - } |
|
7143 | + return $array; |
|
7144 | + } |
|
7145 | 7145 | } |
7146 | 7146 | |
7147 | 7147 | /** |
@@ -7152,29 +7152,29 @@ discard block |
||
7152 | 7152 | */ |
7153 | 7153 | function array_length($array, $deep = 3) |
7154 | 7154 | { |
7155 | - // Work with arrays |
|
7156 | - $array = (array) $array; |
|
7157 | - $length = 0; |
|
7155 | + // Work with arrays |
|
7156 | + $array = (array) $array; |
|
7157 | + $length = 0; |
|
7158 | 7158 | |
7159 | - $deep_count = $deep - 1; |
|
7159 | + $deep_count = $deep - 1; |
|
7160 | 7160 | |
7161 | - foreach ($array as $value) |
|
7162 | - { |
|
7163 | - // Recursive? |
|
7164 | - if (is_array($value)) |
|
7165 | - { |
|
7166 | - // No can't do |
|
7167 | - if ($deep_count <= 0) |
|
7168 | - continue; |
|
7161 | + foreach ($array as $value) |
|
7162 | + { |
|
7163 | + // Recursive? |
|
7164 | + if (is_array($value)) |
|
7165 | + { |
|
7166 | + // No can't do |
|
7167 | + if ($deep_count <= 0) |
|
7168 | + continue; |
|
7169 | 7169 | |
7170 | - $length += array_length($value, $deep_count); |
|
7171 | - } |
|
7170 | + $length += array_length($value, $deep_count); |
|
7171 | + } |
|
7172 | 7172 | |
7173 | - else |
|
7174 | - $length += strlen($value); |
|
7175 | - } |
|
7173 | + else |
|
7174 | + $length += strlen($value); |
|
7175 | + } |
|
7176 | 7176 | |
7177 | - return $length; |
|
7177 | + return $length; |
|
7178 | 7178 | } |
7179 | 7179 | |
7180 | 7180 | ?> |
7181 | 7181 | \ No newline at end of file |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | { |
378 | 378 | $val = 'CASE '; |
379 | 379 | foreach ($members as $k => $v) |
380 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
380 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
381 | 381 | |
382 | 382 | $val = $val . ' END'; |
383 | 383 | $type = 'raw'; |
@@ -1041,11 +1041,11 @@ discard block |
||
1041 | 1041 | // Anything that isn't a specification, punctuation mark, or whitespace. |
1042 | 1042 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
1043 | 1043 | // A series of punctuation marks (except %), possibly separated by whitespace. |
1044 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1044 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1045 | 1045 | // Unwanted trailing punctuation and whitespace. |
1046 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1046 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1047 | 1047 | // Unwanted opening punctuation and whitespace. |
1048 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1048 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1049 | 1049 | ), |
1050 | 1050 | array( |
1051 | 1051 | '', |
@@ -1452,7 +1452,7 @@ discard block |
||
1452 | 1452 | $width = !empty($width) ? ' width="' . $width . '"' : ''; |
1453 | 1453 | $height = !empty($height) ? ' height="' . $height . '"' : ''; |
1454 | 1454 | |
1455 | - $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>' : ''); |
|
1455 | + $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>' : ''); |
|
1456 | 1456 | } |
1457 | 1457 | // Audio. |
1458 | 1458 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | $width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
1461 | 1461 | $height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
1462 | 1462 | |
1463 | - $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>'; |
|
1463 | + $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>'; |
|
1464 | 1464 | } |
1465 | 1465 | // Anything else. |
1466 | 1466 | else |
@@ -1623,7 +1623,7 @@ discard block |
||
1623 | 1623 | 'type' => 'unparsed_commas_content', |
1624 | 1624 | 'test' => '\d+,\d+\]', |
1625 | 1625 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1626 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1626 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1627 | 1627 | { |
1628 | 1628 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1629 | 1629 | if (empty($scheme)) |
@@ -2161,7 +2161,7 @@ discard block |
||
2161 | 2161 | $codes[] = array( |
2162 | 2162 | 'tag' => 'cowsay', |
2163 | 2163 | 'parameters' => array( |
2164 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2164 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2165 | 2165 | { |
2166 | 2166 | static $css_added; |
2167 | 2167 | |
@@ -2178,7 +2178,7 @@ discard block |
||
2178 | 2178 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2179 | 2179 | }, |
2180 | 2180 | ), |
2181 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2181 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2182 | 2182 | { |
2183 | 2183 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2184 | 2184 | }, |
@@ -3550,7 +3550,7 @@ discard block |
||
3550 | 3550 | if ($fp != false) |
3551 | 3551 | { |
3552 | 3552 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3553 | - 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"); |
|
3553 | + 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"); |
|
3554 | 3554 | |
3555 | 3555 | // Read in the HTTP/1.1 or whatever. |
3556 | 3556 | $test = substr(fgets($fp, 11), -1); |
@@ -4151,7 +4151,7 @@ discard block |
||
4151 | 4151 | $toMinify = array(); |
4152 | 4152 | $normal = array(); |
4153 | 4153 | |
4154 | - usort($context['css_files'], function ($a, $b) |
|
4154 | + usort($context['css_files'], function($a, $b) |
|
4155 | 4155 | { |
4156 | 4156 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4157 | 4157 | }); |
@@ -5443,7 +5443,7 @@ discard block |
||
5443 | 5443 | { |
5444 | 5444 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5445 | 5445 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5446 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5446 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5447 | 5447 | if ($keep_alive) |
5448 | 5448 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5449 | 5449 | else |
@@ -5453,7 +5453,7 @@ discard block |
||
5453 | 5453 | { |
5454 | 5454 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5455 | 5455 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5456 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5456 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5457 | 5457 | if ($keep_alive) |
5458 | 5458 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5459 | 5459 | else |
@@ -5609,13 +5609,13 @@ discard block |
||
5609 | 5609 | |
5610 | 5610 | // UTF-8 occurences of MS special characters |
5611 | 5611 | $findchars_utf8 = array( |
5612 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5613 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5614 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5615 | - "\xe2\x80\x98", // left single curly quote |
|
5616 | - "\xe2\x80\x99", // right single curly quote |
|
5617 | - "\xe2\x80\x9c", // left double curly quote |
|
5618 | - "\xe2\x80\x9d", // right double curly quote |
|
5612 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5613 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5614 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5615 | + "\xe2\x80\x98", // left single curly quote |
|
5616 | + "\xe2\x80\x99", // right single curly quote |
|
5617 | + "\xe2\x80\x9c", // left double curly quote |
|
5618 | + "\xe2\x80\x9d", // right double curly quote |
|
5619 | 5619 | ); |
5620 | 5620 | |
5621 | 5621 | // windows 1252 / iso equivalents |
@@ -5631,13 +5631,13 @@ discard block |
||
5631 | 5631 | |
5632 | 5632 | // safe replacements |
5633 | 5633 | $replacechars = array( |
5634 | - ',', // ‚ |
|
5635 | - ',,', // „ |
|
5636 | - '...', // … |
|
5637 | - "'", // ‘ |
|
5638 | - "'", // ’ |
|
5639 | - '"', // “ |
|
5640 | - '"', // ” |
|
5634 | + ',', // ‚ |
|
5635 | + ',,', // „ |
|
5636 | + '...', // … |
|
5637 | + "'", // ‘ |
|
5638 | + "'", // ’ |
|
5639 | + '"', // “ |
|
5640 | + '"', // ” |
|
5641 | 5641 | ); |
5642 | 5642 | |
5643 | 5643 | if ($context['utf8']) |
@@ -6818,7 +6818,7 @@ discard block |
||
6818 | 6818 | EXISTS ( |
6819 | 6819 | SELECT bpv.id_board |
6820 | 6820 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6821 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
6821 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
6822 | 6822 | AND bpv.deny = 0 |
6823 | 6823 | AND bpv.id_board = b.id_board |
6824 | 6824 | )'; |
@@ -6828,7 +6828,7 @@ discard block |
||
6828 | 6828 | AND NOT EXISTS ( |
6829 | 6829 | SELECT bpv.id_board |
6830 | 6830 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6831 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
6831 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
6832 | 6832 | AND bpv.deny = 1 |
6833 | 6833 | AND bpv.id_board = b.id_board |
6834 | 6834 | )'; |
@@ -7099,8 +7099,8 @@ discard block |
||
7099 | 7099 | $i = 0; |
7100 | 7100 | while (empty($done)) |
7101 | 7101 | { |
7102 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7103 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7102 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7103 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7104 | 7104 | else |
7105 | 7105 | $done = true; |
7106 | 7106 | } |
@@ -7110,8 +7110,8 @@ discard block |
||
7110 | 7110 | $i = 0; |
7111 | 7111 | while (empty($done)) |
7112 | 7112 | { |
7113 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7114 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7113 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7114 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7115 | 7115 | else |
7116 | 7116 | $done = true; |
7117 | 7117 | } |
@@ -279,7 +279,6 @@ discard block |
||
279 | 279 | $condition = 'id_member IN ({array_int:members})'; |
280 | 280 | $parameters['members'] = $members; |
281 | 281 | } |
282 | - |
|
283 | 282 | elseif ($members === null) |
284 | 283 | $condition = '1=1'; |
285 | 284 | |
@@ -382,11 +381,9 @@ discard block |
||
382 | 381 | $val = $val . ' END'; |
383 | 382 | $type = 'raw'; |
384 | 383 | } |
385 | - |
|
386 | 384 | else |
387 | 385 | $val = alert_count($members, true); |
388 | 386 | } |
389 | - |
|
390 | 387 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
391 | 388 | { |
392 | 389 | $val = $var . ' ' . $val . ' 1'; |
@@ -2162,7 +2159,7 @@ discard block |
||
2162 | 2159 | 'tag' => 'cowsay', |
2163 | 2160 | 'parameters' => array( |
2164 | 2161 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2165 | - { |
|
2162 | + { |
|
2166 | 2163 | static $css_added; |
2167 | 2164 | |
2168 | 2165 | if (empty($css_added)) |
@@ -2179,7 +2176,7 @@ discard block |
||
2179 | 2176 | }, |
2180 | 2177 | ), |
2181 | 2178 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2182 | - { |
|
2179 | + { |
|
2183 | 2180 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2184 | 2181 | }, |
2185 | 2182 | ), |
@@ -3277,7 +3274,7 @@ discard block |
||
3277 | 3274 | |
3278 | 3275 | // Replace away! |
3279 | 3276 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
3280 | - { |
|
3277 | + { |
|
3281 | 3278 | return $smileyPregReplacements[$matches[1]]; |
3282 | 3279 | }, $message); |
3283 | 3280 | } |
@@ -4073,7 +4070,6 @@ discard block |
||
4073 | 4070 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4074 | 4071 | $minSeed = $js_file['options']['seed']; |
4075 | 4072 | } |
4076 | - |
|
4077 | 4073 | else |
4078 | 4074 | { |
4079 | 4075 | echo ' |
@@ -6255,7 +6251,6 @@ discard block |
||
6255 | 6251 | $isWritable = true; |
6256 | 6252 | break; |
6257 | 6253 | } |
6258 | - |
|
6259 | 6254 | else |
6260 | 6255 | @chmod($file, $val); |
6261 | 6256 | } |
@@ -7187,7 +7182,6 @@ discard block |
||
7187 | 7182 | |
7188 | 7183 | $length += array_length($value, $deep_count); |
7189 | 7184 | } |
7190 | - |
|
7191 | 7185 | else |
7192 | 7186 | $length += strlen($value); |
7193 | 7187 | } |
@@ -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; |
@@ -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 | } |
@@ -738,7 +738,7 @@ |
||
738 | 738 | ); |
739 | 739 | else |
740 | 740 | $context['allowed_actions'] = array( |
741 | - 'ok' => $txt['admin_browse_w_approve'] .' '. $txt['admin_browse_no_email'], |
|
741 | + 'ok' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_no_email'], |
|
742 | 742 | 'okemail' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_w_email'], |
743 | 743 | 'require_activation' => $txt['admin_browse_w_approve_require_activate'], |
744 | 744 | 'reject' => $txt['admin_browse_w_reject'], |