@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | clean_cache(); |
170 | 170 | |
171 | 171 | // If warning decrement is enabled and we have people who have not had a new warning in 24 hours, lower their warning level. |
172 | - list (, , $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']); |
|
172 | + list (,, $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']); |
|
173 | 173 | if ($modSettings['warning_decrement']) |
174 | 174 | { |
175 | 175 | // Find every member who has a warning level... |
@@ -1665,7 +1665,7 @@ discard block |
||
1665 | 1665 | // Determine action based on last_login... |
1666 | 1666 | $purgeMembers = array(); |
1667 | 1667 | $markReadMembers = array(); |
1668 | - foreach($members as $member) |
|
1668 | + foreach ($members as $member) |
|
1669 | 1669 | { |
1670 | 1670 | if ($member['last_login'] <= $cleanupBeyond) |
1671 | 1671 | $purgeMembers[] = $member['id_member']; |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | |
852 | 852 | clean_cache('data'); |
853 | 853 | |
854 | - cache_put_data('parsed_boards_descriptions_'. $parsed_boards_cat_id, $already_parsed_boards, 864000); |
|
854 | + cache_put_data('parsed_boards_descriptions_' . $parsed_boards_cat_id, $already_parsed_boards, 864000); |
|
855 | 855 | |
856 | 856 | if (empty($boardOptions['dont_log'])) |
857 | 857 | logAction('edit_board', array('board' => $board_id), 'admin'); |
@@ -1579,7 +1579,7 @@ discard block |
||
1579 | 1579 | $context['description_allowed_tags'] |
1580 | 1580 | ); |
1581 | 1581 | |
1582 | - cache_put_data('parsed_boards_descriptions_'. $category_id, $already_parsed_boards, 864000); |
|
1582 | + cache_put_data('parsed_boards_descriptions_' . $category_id, $already_parsed_boards, 864000); |
|
1583 | 1583 | |
1584 | 1584 | return $already_parsed_boards; |
1585 | 1585 | } |
@@ -169,15 +169,15 @@ discard block |
||
169 | 169 | $class_name = $this->getImplementationClassKeyName(); |
170 | 170 | $class_name_txt_key = strtolower($class_name); |
171 | 171 | |
172 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
172 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
173 | 173 | $config_vars[] = array( |
174 | 174 | self::CLASS_KEY, |
175 | - $txt['cache_'. $class_name_txt_key .'_servers'], |
|
175 | + $txt['cache_' . $class_name_txt_key . '_servers'], |
|
176 | 176 | 'file', |
177 | 177 | 'text', |
178 | 178 | 0, |
179 | - 'cache_'. $class_name_txt_key, |
|
180 | - 'subtext' => $txt['cache_'. $class_name_txt_key .'_servers_subtext']); |
|
179 | + 'cache_' . $class_name_txt_key, |
|
180 | + 'subtext' => $txt['cache_' . $class_name_txt_key . '_servers_subtext']); |
|
181 | 181 | |
182 | 182 | if (!isset($context['settings_post_javascript'])) |
183 | 183 | $context['settings_post_javascript'] = ''; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $context['settings_post_javascript'] .= ' |
186 | 186 | $("#cache_accelerator").change(function (e) { |
187 | 187 | var cache_type = e.currentTarget.value; |
188 | - $("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "'. $class_name .'"); |
|
188 | + $("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "' . $class_name . '"); |
|
189 | 189 | });'; |
190 | 190 | } |
191 | 191 |
@@ -195,8 +195,7 @@ |
||
195 | 195 | ); |
196 | 196 | |
197 | 197 | $categories[$row_board['id_cat']]['link'] = '<a id="c' . $row_board['id_cat'] . '"></a>' . (!$context['user']['is_guest'] ? |
198 | - '<a href="' . $scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], $row_board['cat_name']) . '">' . $row_board['cat_name'] . '</a>' : |
|
199 | - $row_board['cat_name']); |
|
198 | + '<a href="' . $scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], $row_board['cat_name']) . '">' . $row_board['cat_name'] . '</a>' : $row_board['cat_name']); |
|
200 | 199 | |
201 | 200 | } |
202 | 201 |
@@ -455,7 +455,7 @@ |
||
455 | 455 | |
456 | 456 | elseif ($context['uninstalling']) |
457 | 457 | echo ' |
458 | - ', $txt['package_uninstall_done'] .' <br> |
|
458 | + ', $txt['package_uninstall_done'] . ' <br> |
|
459 | 459 | ', '<a href="', $context['keep_url'], '" class="button">', $txt['package_keep'], '</a>', '<a href="', $context['remove_url'], '" class="button">', $txt['package_delete2'], '</a>'; |
460 | 460 | |
461 | 461 | elseif ($context['install_finished']) |
@@ -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'; |
@@ -1039,11 +1039,11 @@ discard block |
||
1039 | 1039 | // Anything that isn't a specification, punctuation mark, or whitespace. |
1040 | 1040 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
1041 | 1041 | // A series of punctuation marks (except %), possibly separated by whitespace. |
1042 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1042 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1043 | 1043 | // Unwanted trailing punctuation and whitespace. |
1044 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1044 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1045 | 1045 | // Unwanted opening punctuation and whitespace. |
1046 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1046 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1047 | 1047 | ), |
1048 | 1048 | array( |
1049 | 1049 | '', |
@@ -1462,7 +1462,7 @@ discard block |
||
1462 | 1462 | $width = !empty($width) ? ' width="' . $width . '"' : ''; |
1463 | 1463 | $height = !empty($height) ? ' height="' . $height . '"' : ''; |
1464 | 1464 | |
1465 | - $returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
1465 | + $returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
1466 | 1466 | } |
1467 | 1467 | // Audio. |
1468 | 1468 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1470,7 +1470,7 @@ discard block |
||
1470 | 1470 | $width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
1471 | 1471 | $height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
1472 | 1472 | |
1473 | - $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>'; |
|
1473 | + $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>'; |
|
1474 | 1474 | } |
1475 | 1475 | // Anything else. |
1476 | 1476 | else |
@@ -1639,7 +1639,7 @@ discard block |
||
1639 | 1639 | 'type' => 'unparsed_commas_content', |
1640 | 1640 | 'test' => '\d+,\d+\]', |
1641 | 1641 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1642 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1642 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1643 | 1643 | { |
1644 | 1644 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1645 | 1645 | if (empty($scheme)) |
@@ -2177,12 +2177,12 @@ discard block |
||
2177 | 2177 | $codes[] = array( |
2178 | 2178 | 'tag' => 'cowsay', |
2179 | 2179 | 'parameters' => array( |
2180 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2180 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2181 | 2181 | { |
2182 | 2182 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2183 | 2183 | }, |
2184 | 2184 | ), |
2185 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2185 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2186 | 2186 | { |
2187 | 2187 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2188 | 2188 | }, |
@@ -3563,7 +3563,7 @@ discard block |
||
3563 | 3563 | if ($fp != false) |
3564 | 3564 | { |
3565 | 3565 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3566 | - 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"); |
|
3566 | + 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"); |
|
3567 | 3567 | |
3568 | 3568 | // Read in the HTTP/1.1 or whatever. |
3569 | 3569 | $test = substr(fgets($fp, 11), -1); |
@@ -4164,7 +4164,7 @@ discard block |
||
4164 | 4164 | $toMinify = array(); |
4165 | 4165 | $normal = array(); |
4166 | 4166 | |
4167 | - uasort($context['css_files'], function ($a, $b) |
|
4167 | + uasort($context['css_files'], function($a, $b) |
|
4168 | 4168 | { |
4169 | 4169 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4170 | 4170 | }); |
@@ -5461,7 +5461,7 @@ discard block |
||
5461 | 5461 | { |
5462 | 5462 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5463 | 5463 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5464 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5464 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5465 | 5465 | if ($keep_alive) |
5466 | 5466 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5467 | 5467 | else |
@@ -5471,7 +5471,7 @@ discard block |
||
5471 | 5471 | { |
5472 | 5472 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5473 | 5473 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5474 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5474 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5475 | 5475 | if ($keep_alive) |
5476 | 5476 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5477 | 5477 | else |
@@ -5719,13 +5719,13 @@ discard block |
||
5719 | 5719 | |
5720 | 5720 | // UTF-8 occurences of MS special characters |
5721 | 5721 | $findchars_utf8 = array( |
5722 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5723 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5724 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5725 | - "\xe2\x80\x98", // left single curly quote |
|
5726 | - "\xe2\x80\x99", // right single curly quote |
|
5727 | - "\xe2\x80\x9c", // left double curly quote |
|
5728 | - "\xe2\x80\x9d", // right double curly quote |
|
5722 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5723 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5724 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5725 | + "\xe2\x80\x98", // left single curly quote |
|
5726 | + "\xe2\x80\x99", // right single curly quote |
|
5727 | + "\xe2\x80\x9c", // left double curly quote |
|
5728 | + "\xe2\x80\x9d", // right double curly quote |
|
5729 | 5729 | ); |
5730 | 5730 | |
5731 | 5731 | // windows 1252 / iso equivalents |
@@ -5741,13 +5741,13 @@ discard block |
||
5741 | 5741 | |
5742 | 5742 | // safe replacements |
5743 | 5743 | $replacechars = array( |
5744 | - ',', // ‚ |
|
5745 | - ',,', // „ |
|
5746 | - '...', // … |
|
5747 | - "'", // ‘ |
|
5748 | - "'", // ’ |
|
5749 | - '"', // “ |
|
5750 | - '"', // ” |
|
5744 | + ',', // ‚ |
|
5745 | + ',,', // „ |
|
5746 | + '...', // … |
|
5747 | + "'", // ‘ |
|
5748 | + "'", // ’ |
|
5749 | + '"', // “ |
|
5750 | + '"', // ” |
|
5751 | 5751 | ); |
5752 | 5752 | |
5753 | 5753 | if ($context['utf8']) |
@@ -6090,7 +6090,7 @@ discard block |
||
6090 | 6090 | $desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : ''); |
6091 | 6091 | |
6092 | 6092 | // We don't want abbreviations like '+03' or '-11'. |
6093 | - $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) { |
|
6093 | + $abbrs = array_filter($tzvalue['abbrs'], function($abbr) { |
|
6094 | 6094 | return !strspn($abbr, '+-'); |
6095 | 6095 | }); |
6096 | 6096 | $abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array(); |
@@ -7054,7 +7054,7 @@ discard block |
||
7054 | 7054 | EXISTS ( |
7055 | 7055 | SELECT bpv.id_board |
7056 | 7056 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7057 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7057 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7058 | 7058 | AND bpv.deny = 0 |
7059 | 7059 | AND bpv.id_board = b.id_board |
7060 | 7060 | )'; |
@@ -7064,7 +7064,7 @@ discard block |
||
7064 | 7064 | AND NOT EXISTS ( |
7065 | 7065 | SELECT bpv.id_board |
7066 | 7066 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7067 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7067 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7068 | 7068 | AND bpv.deny = 1 |
7069 | 7069 | AND bpv.id_board = b.id_board |
7070 | 7070 | )'; |
@@ -7335,8 +7335,8 @@ discard block |
||
7335 | 7335 | $i = 0; |
7336 | 7336 | while (empty($done)) |
7337 | 7337 | { |
7338 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7339 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7338 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7339 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7340 | 7340 | else |
7341 | 7341 | $done = true; |
7342 | 7342 | } |
@@ -7346,8 +7346,8 @@ discard block |
||
7346 | 7346 | $i = 0; |
7347 | 7347 | while (empty($done)) |
7348 | 7348 | { |
7349 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7350 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7349 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7350 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7351 | 7351 | else |
7352 | 7352 | $done = true; |
7353 | 7353 | } |
@@ -393,18 +393,18 @@ 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 | 406 | 'class' => 'inline_mod_check', |
407 | - 'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>', |
|
407 | + 'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>', |
|
408 | 408 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 |
409 | 409 | ), |
410 | 410 | ); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | $quickbuttons = array( |
470 | 470 | 'delete' => array( |
471 | 471 | 'label' => $txt['remove_message'], |
472 | - 'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
472 | + 'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
473 | 473 | 'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '"', |
474 | 474 | 'class' => 'you_sure', |
475 | 475 | 'icon' => 'remove_button', |
@@ -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, |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | call_integration_hook('integrate_fetch_alerts', array(&$alerts, &$formats)); |
360 | 360 | |
361 | 361 | // Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.) |
362 | - $formats = array_map(function ($format) use ($scripturl) { |
|
362 | + $formats = array_map(function($format) use ($scripturl) { |
|
363 | 363 | $format['link'] = str_replace('{scripturl}', $scripturl, $format['link']); |
364 | 364 | $format['text'] = str_replace('{scripturl}', $scripturl, $format['text']); |
365 | 365 | |
@@ -1167,20 +1167,20 @@ discard block |
||
1167 | 1167 | $context['posts'][$key]['quickbuttons'] = array( |
1168 | 1168 | 'reply' => array( |
1169 | 1169 | 'label' => $txt['reply'], |
1170 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
1170 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
1171 | 1171 | 'icon' => 'reply_button', |
1172 | 1172 | 'show' => $post['can_reply'] |
1173 | 1173 | ), |
1174 | 1174 | 'quote' => array( |
1175 | 1175 | 'label' => $txt['quote_action'], |
1176 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
1176 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
1177 | 1177 | 'icon' => 'quote', |
1178 | 1178 | 'show' => $post['can_quote'] |
1179 | 1179 | ), |
1180 | 1180 | 'remove' => array( |
1181 | 1181 | 'label' => $txt['remove'], |
1182 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
1183 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'"', |
|
1182 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1183 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '"', |
|
1184 | 1184 | 'class' => 'you_sure', |
1185 | 1185 | 'icon' => 'remove_button', |
1186 | 1186 | 'show' => $post['can_delete'] |
@@ -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'] |
136 | 136 | ) |
137 | 137 | ); |