@@ -222,7 +222,7 @@ |
||
222 | 222 | if (!function_exists('mb_encode_numericentity')) |
223 | 223 | return false; |
224 | 224 | |
225 | - $entity = mb_encode_numericentity($string, array(0x0,0x10FFFF,0x0,0xFFFFFF), $encoding); |
|
225 | + $entity = mb_encode_numericentity($string, array(0x0, 0x10FFFF, 0x0, 0xFFFFFF), $encoding); |
|
226 | 226 | |
227 | 227 | if (strpos($entity, '&#') !== 0) |
228 | 228 | return false; |
@@ -315,7 +315,7 @@ |
||
315 | 315 | |
316 | 316 | array_walk_recursive( |
317 | 317 | $_POST, |
318 | - function (&$value, $key) use ($context, $smcFunc) |
|
318 | + function(&$value, $key) use ($context, $smcFunc) |
|
319 | 319 | { |
320 | 320 | // Normalize Unicode characters. (Does nothing if not in UTF-8 mode.) |
321 | 321 | $value = $smcFunc['normalize']($value); |
@@ -2060,7 +2060,7 @@ |
||
2060 | 2060 | new RecursiveIteratorIterator( |
2061 | 2061 | new RecursiveCallbackFilterIterator( |
2062 | 2062 | new RecursiveDirectoryIterator($dirname, FilesystemIterator::UNIX_PATHS), |
2063 | - function ($fileInfo, $currentFile, $iterator) |
|
2063 | + function($fileInfo, $currentFile, $iterator) |
|
2064 | 2064 | { |
2065 | 2065 | // Allow recursion |
2066 | 2066 | if ($iterator->hasChildren()) |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | $combining_classes = utf8_combining_classes(); |
250 | 250 | |
251 | 251 | // Replace characters with decomposed forms. |
252 | - for ($i=0; $i < count($chars); $i++) |
|
252 | + for ($i = 0; $i < count($chars); $i++) |
|
253 | 253 | { |
254 | 254 | // Hangul characters. |
255 | 255 | if ($chars[$i] >= "\xEA\xB0\x80" && $chars[$i] <= "\xED\x9E\xA3") |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | { |
284 | 284 | $temp = $chars[$i]; |
285 | 285 | $chars[$i] = $chars[$i - 1]; |
286 | - $chars[$i -1] = $temp; |
|
286 | + $chars[$i - 1] = $temp; |
|
287 | 287 | |
288 | 288 | // Backtrack and check again. |
289 | 289 | if ($i > 1) |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | |
528 | 528 | // Use placeholders to preserve known emoji from further processing. |
529 | 529 | // Regex source is https://unicode.org/reports/tr51/#EBNF_and_Regex |
530 | - $string = preg_replace_callback( |
|
530 | + $string = preg_replace_callback( |
|
531 | 531 | '/' . |
532 | 532 | // Flag emojis |
533 | 533 | '[' . $prop_classes['Regional_Indicator'] . ']{2}' . |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | ')?' . |
557 | 557 | ')*' . |
558 | 558 | '/u', |
559 | - function ($matches) use (&$placeholders) |
|
559 | + function($matches) use (&$placeholders) |
|
560 | 560 | { |
561 | 561 | // Skip lone ASCII characters that are not actully part of an emoji sequence. |
562 | 562 | // This can happen because the digits 0-9 and the '*' and '#' characters are |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | // Use placeholders for sanctioned variation selectors. |
588 | 588 | $string = preg_replace_callback( |
589 | 589 | $patterns, |
590 | - function ($matches) use (&$placeholders) |
|
590 | + function($matches) use (&$placeholders) |
|
591 | 591 | { |
592 | 592 | $placeholders[$matches[0]] = "\xEE\xB3\x9B" . md5($matches[0]) . "\xEE\xB3\x9C"; |
593 | 593 | return $placeholders[$matches[0]]; |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | // Do the thing. |
668 | 668 | $string = preg_replace_callback( |
669 | 669 | '/' . $pattern . '/u', |
670 | - function ($matches) use ($placeholders) |
|
670 | + function($matches) use ($placeholders) |
|
671 | 671 | { |
672 | 672 | return strtr($matches[0], $placeholders); |
673 | 673 | }, |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | } |
753 | 753 | } |
754 | 754 | // This sort works decently well to ensure widely used scripts are ranked before rare scripts. |
755 | -uasort($funcs['utf8_regex_joining_type']['data'], function ($a, $b) |
|
755 | +uasort($funcs['utf8_regex_joining_type']['data'], function($a, $b) |
|
756 | 756 | { |
757 | 757 | if ($a['stats']['age'] == $b['stats']['age']) |
758 | 758 | { |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | } |
829 | 829 | } |
830 | 830 | // Again, sort commonly used scripts before rare scripts. |
831 | -uasort($funcs['utf8_regex_indic']['data'], function ($a, $b) |
|
831 | +uasort($funcs['utf8_regex_indic']['data'], function($a, $b) |
|
832 | 832 | { |
833 | 833 | if ($a['stats']['age'] == $b['stats']['age']) |
834 | 834 | { |
@@ -131,14 +131,14 @@ discard block |
||
131 | 131 | $class_name = $this->getImplementationClassKeyName(); |
132 | 132 | $class_name_txt_key = strtolower($class_name); |
133 | 133 | |
134 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
134 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
135 | 135 | $config_vars[] = array( |
136 | - 'cachedir_'. $class_name_txt_key, |
|
137 | - $txt['cachedir_'. $class_name_txt_key], |
|
136 | + 'cachedir_' . $class_name_txt_key, |
|
137 | + $txt['cachedir_' . $class_name_txt_key], |
|
138 | 138 | 'file', |
139 | 139 | 'text', |
140 | 140 | 36, |
141 | - 'cache_'. $class_name_txt_key .'_cachedir', |
|
141 | + 'cache_' . $class_name_txt_key . '_cachedir', |
|
142 | 142 | ); |
143 | 143 | |
144 | 144 | if (!isset($context['settings_post_javascript'])) |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $context['settings_post_javascript'] .= ' |
148 | 148 | $("#cache_accelerator").change(function (e) { |
149 | 149 | var cache_type = e.currentTarget.value; |
150 | - $("#cachedir_'. $class_name_txt_key .'").prop("disabled", cache_type != "'. $class_name .'"); |
|
150 | + $("#cachedir_'. $class_name_txt_key . '").prop("disabled", cache_type != "' . $class_name . '"); |
|
151 | 151 | });'; |
152 | 152 | } |
153 | 153 |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return false; |
93 | 93 | }, |
94 | 94 | 'utf8_version' => '8.0', |
95 | - 'utf8_version_check' => function (){ |
|
95 | + 'utf8_version_check' => function() { |
|
96 | 96 | global $db_connection; |
97 | 97 | $request = pg_query($db_connection, 'SELECT version()'); |
98 | 98 | list ($version) = pg_fetch_row($request); |
@@ -987,7 +987,7 @@ discard block |
||
987 | 987 | $incontext['continue'] = 1; |
988 | 988 | |
989 | 989 | // Check Postgres setting |
990 | - if ( $db_type === 'postgresql') |
|
990 | + if ($db_type === 'postgresql') |
|
991 | 991 | { |
992 | 992 | load_database(); |
993 | 993 | $result = $smcFunc['db_query']('', ' |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | } |
188 | 188 | } |
189 | 189 | |
190 | - $unnotified = array_filter($this->members['watching'], function ($member) { |
|
190 | + $unnotified = array_filter($this->members['watching'], function($member) { |
|
191 | 191 | return empty($member['sent']); |
192 | 192 | }); |
193 | 193 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | if ($type == 'edit' || !empty($this->_details['respawns'])) |
197 | 197 | { |
198 | 198 | // Notifications about modified posts only go to members who were mentioned or quoted |
199 | - $this->members['watching'] = $type == 'edit' ? array(): $unnotified; |
|
199 | + $this->members['watching'] = $type == 'edit' ? array() : $unnotified; |
|
200 | 200 | |
201 | 201 | // If this post has no quotes or mentions, just delete any obsolete alerts and bail out. |
202 | 202 | if (empty($this->members['quoted']) && empty($this->members['mentioned'])) |
@@ -512,8 +512,7 @@ discard block |
||
512 | 512 | if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($this->prefs[$member_id])) |
513 | 513 | { |
514 | 514 | $pref = !empty($this->prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ? |
515 | - $this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : |
|
516 | - (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0); |
|
515 | + $this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0); |
|
517 | 516 | |
518 | 517 | $message_type = 'notification_' . $type; |
519 | 518 | |
@@ -532,8 +531,7 @@ discard block |
||
532 | 531 | elseif ($type == 'topic') |
533 | 532 | { |
534 | 533 | $pref = !empty($this->prefs[$member_id]['board_notify_' . $topicOptions['board']]) ? |
535 | - $this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : |
|
536 | - (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0); |
|
534 | + $this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0); |
|
537 | 535 | |
538 | 536 | $content_type = 'board'; |
539 | 537 |
@@ -93,14 +93,14 @@ 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'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
98 | 98 | 'class' => 'you_sure', |
99 | 99 | 'icon' => 'ignore' |
100 | 100 | ), |
101 | 101 | 'close' => array( |
102 | 102 | 'label' => $context['view_closed'] ? $txt['mc_reportedp_open'] : $txt['mc_reportedp_close'], |
103 | - '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 | + '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'], |
|
104 | 104 | 'icon' => $context['view_closed'] ? 'folder' : 'close', |
105 | 105 | ), |
106 | 106 | ); |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | if ($context['report_type'] == 'posts') |
110 | 110 | $context['reports'][$key]['quickbuttons']['delete'] = array( |
111 | 111 | 'label' => $txt['mc_reportedp_delete'], |
112 | - 'href' => $scripturl.'?action=deletemsg;topic='.$report['topic']['id'].'.0;msg='.$report['topic']['id_msg'].';modcenter;'.$context['session_var'].'='.$context['session_id'], |
|
113 | - 'javascript' => 'data-confirm="'.$txt['mc_reportedp_delete_confirm'].'"', |
|
112 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $report['topic']['id'] . '.0;msg=' . $report['topic']['id_msg'] . ';modcenter;' . $context['session_var'] . '=' . $context['session_id'], |
|
113 | + 'javascript' => 'data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '"', |
|
114 | 114 | 'class' => 'you_sure', |
115 | 115 | 'icon' => 'delete', |
116 | 116 | 'show' => !$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards'])) |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | |
119 | 119 | // Ban reported member/post author link |
120 | 120 | if ($context['report_type'] == 'members') |
121 | - $ban_link = $scripturl.'?action=admin;area=ban;sa=add;u='.$report['user']['id'].';'.$context['session_var'].'='.$context['session_id']; |
|
121 | + $ban_link = $scripturl . '?action=admin;area=ban;sa=add;u=' . $report['user']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']; |
|
122 | 122 | else |
123 | - $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']; |
|
123 | + $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']; |
|
124 | 124 | |
125 | 125 | $context['reports'][$key]['quickbuttons'] += array( |
126 | 126 | 'ban' => array( |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | ), |
132 | 132 | 'quickmod' => array( |
133 | 133 | 'class' => 'inline_mod_check', |
134 | - 'content' => '<input type="checkbox" name="close[]" value="'.$report['id'].'">', |
|
134 | + 'content' => '<input type="checkbox" name="close[]" value="' . $report['id'] . '">', |
|
135 | 135 | 'show' => !$context['view_closed'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 |
136 | 136 | ) |
137 | 137 | ); |