@@ -163,7 +163,8 @@ |
||
163 | 163 | else |
164 | 164 | $context['help_text'] = $_GET['help']; |
165 | 165 | |
166 | - switch ($_GET['help']) { |
|
166 | + switch ($_GET['help']) |
|
167 | + { |
|
167 | 168 | case 'cal_short_months': |
168 | 169 | $context['help_text'] = sprintf($context['help_text'], $txt['months_short'][1], $txt['months_titles'][1]); |
169 | 170 | break; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | // Set a list of common functions. |
105 | 105 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
106 | 106 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
107 | - { |
|
107 | + { |
|
108 | 108 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
109 | 109 | return $string; |
110 | 110 | } : function($string) |
@@ -929,7 +929,6 @@ discard block |
||
929 | 929 | $user_info_min[$row['id_member']]['time_offset'] = ($tz_user->getOffset($time_user) - |
930 | 930 | $tz_system->getOffset($time_system)) / 3600; |
931 | 931 | } |
932 | - |
|
933 | 932 | else |
934 | 933 | $user_info_min[$row['id_member']]['time_offset'] = empty($row['time_offset']) ? 0 : $row['time_offset']; |
935 | 934 | } |
@@ -1657,7 +1656,6 @@ discard block |
||
1657 | 1656 | $time_user = new DateTime('now', $tz_user); |
1658 | 1657 | $profile['time_offset'] = ($tz_user->getOffset($time_user) - $tz_system->getOffset($time_system)) / 3600; |
1659 | 1658 | } |
1660 | - |
|
1661 | 1659 | else |
1662 | 1660 | { |
1663 | 1661 | // !!! Compatibility. |
@@ -2322,7 +2320,6 @@ discard block |
||
2322 | 2320 | loadLanguage('index+Modifications'); |
2323 | 2321 | $context['template_layers'] = array(); |
2324 | 2322 | } |
2325 | - |
|
2326 | 2323 | else |
2327 | 2324 | { |
2328 | 2325 | // Custom templates to load, or just default? |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | 'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'], |
835 | 835 | 'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1, |
836 | 836 | 'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0, |
837 | - 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0, |
|
837 | + 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0, |
|
838 | 838 | 'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0, |
839 | 839 | ), |
840 | 840 | 'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '', |
@@ -2492,7 +2492,7 @@ discard block |
||
2492 | 2492 | ); |
2493 | 2493 | |
2494 | 2494 | // Add the JQuery library to the list of files to load. |
2495 | - $jQueryUrls = array ('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/'. JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-'. JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-'. JQUERY_VERSION . '.min.js'); |
|
2495 | + $jQueryUrls = array('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/' . JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-' . JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-' . JQUERY_VERSION . '.min.js'); |
|
2496 | 2496 | |
2497 | 2497 | if (isset($modSettings['jquery_source']) && array_key_exists($modSettings['jquery_source'], $jQueryUrls)) |
2498 | 2498 | loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery'); |
@@ -2733,8 +2733,7 @@ discard block |
||
2733 | 2733 | $context['css_files_order'] = array(); |
2734 | 2734 | |
2735 | 2735 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2736 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2737 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2736 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2738 | 2737 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2739 | 2738 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2740 | 2739 | $params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true; |
@@ -2849,8 +2848,7 @@ discard block |
||
2849 | 2848 | global $settings, $context, $modSettings; |
2850 | 2849 | |
2851 | 2850 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2852 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2853 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2851 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2854 | 2852 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2855 | 2853 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2856 | 2854 | $params['async'] = isset($params['async']) ? $params['async'] : false; |
@@ -2955,7 +2953,7 @@ discard block |
||
2955 | 2953 | $elements[] = JavaScriptEscape($element); |
2956 | 2954 | } |
2957 | 2955 | |
2958 | - $value = '[' . implode(', ',$elements) . ']'; |
|
2956 | + $value = '[' . implode(', ', $elements) . ']'; |
|
2959 | 2957 | } |
2960 | 2958 | } |
2961 | 2959 | |
@@ -3636,8 +3634,7 @@ discard block |
||
3636 | 3634 | |
3637 | 3635 | // What accelerator we are going to try. |
3638 | 3636 | $cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT; |
3639 | - $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : |
|
3640 | - CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3637 | + $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3641 | 3638 | |
3642 | 3639 | // Do some basic tests. |
3643 | 3640 | if (class_exists($fully_qualified_class_name)) |
@@ -3884,7 +3881,7 @@ discard block |
||
3884 | 3881 | // External url. |
3885 | 3882 | else |
3886 | 3883 | { |
3887 | - $parsed_image = parse_iri($data['avatar']. PHP_URL_SCHEME); |
|
3884 | + $parsed_image = parse_iri($data['avatar'] . PHP_URL_SCHEME); |
|
3888 | 3885 | $image = is_array($parsed_image) ? get_proxied_url($data['avatar']) : $modSettings['avatar_url'] . '/' . $data['avatar']; |
3889 | 3886 | } |
3890 | 3887 | } |
@@ -3944,7 +3941,7 @@ discard block |
||
3944 | 3941 | $auth_secret = hash_file('sha256', $boarddir . '/Settings.php'); |
3945 | 3942 | |
3946 | 3943 | // Set the last error to now, but only every 15 minutes. Don't need to flood the logs. |
3947 | - if (empty($db_last_error) || ($db_last_error + 60*15) <= time()) |
|
3944 | + if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time()) |
|
3948 | 3945 | { |
3949 | 3946 | updateDbLastError(time()); |
3950 | 3947 | loadLanguage('Errors'); |
@@ -280,7 +280,6 @@ discard block |
||
280 | 280 | $this_category[$row_board['id_board']]['board_class'] = 'on'; |
281 | 281 | $this_category[$row_board['id_board']]['board_tooltip'] = $txt['new_posts']; |
282 | 282 | } |
283 | - |
|
284 | 283 | else |
285 | 284 | { |
286 | 285 | $this_category[$row_board['id_board']]['board_tooltip'] = $txt['old_posts']; |
@@ -415,7 +414,6 @@ discard block |
||
415 | 414 | $this_last_post['href'] = $scripturl . '?topic=' . $row_board['id_topic'] . '.msg' . ($user_info['is_guest'] ? $row_board['id_msg'] : $row_board['new_from']) . (empty($row_board['is_read']) ? ';boardseen' : '') . '#new'; |
416 | 415 | $this_last_post['link'] = '<a href="' . $this_last_post['href'] . '" title="' . $row_board['subject'] . '">' . $row_board['short_subject'] . '</a>'; |
417 | 416 | } |
418 | - |
|
419 | 417 | else |
420 | 418 | { |
421 | 419 | $this_last_post['href'] = ''; |
@@ -510,8 +508,7 @@ discard block |
||
510 | 508 | $board['last_post']['last_post_message'] = sprintf($txt['last_post_message'], $board['last_post']['member']['link'], $board['last_post']['link'], $board['last_post']['time'] > 0 ? timeformat($board['last_post']['time']) : $txt['not_applicable']); |
511 | 509 | } |
512 | 510 | } |
513 | - |
|
514 | - else |
|
511 | + else |
|
515 | 512 | foreach ($this_category as &$board) |
516 | 513 | { |
517 | 514 | if (isset($boards_parsed_data_by_cat_id[$board['id_cat']][$board['id']])) |
@@ -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 |
@@ -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 | } |
@@ -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']) |
@@ -364,8 +364,8 @@ discard block |
||
364 | 364 | } |
365 | 365 | |
366 | 366 | // Clean up tags with children |
367 | - foreach($bbcTagsChildren as $parent_tag => $children) |
|
368 | - foreach($children as $index => $child_tag) |
|
367 | + foreach ($bbcTagsChildren as $parent_tag => $children) |
|
368 | + foreach ($children as $index => $child_tag) |
|
369 | 369 | { |
370 | 370 | // Remove entries where parent and child tag is the same |
371 | 371 | if ($child_tag == $parent_tag) |
@@ -1888,25 +1888,25 @@ discard block |
||
1888 | 1888 | $fields = array(); |
1889 | 1889 | $new_sort = array(); |
1890 | 1890 | |
1891 | - while($row = $smcFunc['db_fetch_assoc']($request)) |
|
1891 | + while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
1892 | 1892 | $fields[] = $row['id_field']; |
1893 | 1893 | $smcFunc['db_free_result']($request); |
1894 | 1894 | |
1895 | 1895 | $idx = array_search($context['fid'], $fields); |
1896 | 1896 | |
1897 | - if ($_GET['move'] == 'down' && count($fields) - 1 > $idx ) |
|
1897 | + if ($_GET['move'] == 'down' && count($fields) - 1 > $idx) |
|
1898 | 1898 | { |
1899 | - $new_sort = array_slice($fields ,0 ,$idx ,true); |
|
1899 | + $new_sort = array_slice($fields, 0, $idx, true); |
|
1900 | 1900 | $new_sort[] = $fields[$idx + 1]; |
1901 | 1901 | $new_sort[] = $fields[$idx]; |
1902 | - $new_sort += array_slice($fields ,$idx + 2 ,count($fields) ,true); |
|
1902 | + $new_sort += array_slice($fields, $idx + 2, count($fields), true); |
|
1903 | 1903 | } |
1904 | 1904 | elseif ($context['fid'] > 0 and $idx < count($fields)) |
1905 | 1905 | { |
1906 | - $new_sort = array_slice($fields ,0 ,($idx - 1) ,true); |
|
1906 | + $new_sort = array_slice($fields, 0, ($idx - 1), true); |
|
1907 | 1907 | $new_sort[] = $fields[$idx]; |
1908 | 1908 | $new_sort[] = $fields[$idx - 1]; |
1909 | - $new_sort += array_slice($fields ,($idx + 1) ,count($fields) ,true); |
|
1909 | + $new_sort += array_slice($fields, ($idx + 1), count($fields), true); |
|
1910 | 1910 | } |
1911 | 1911 | else |
1912 | 1912 | redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler |
@@ -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', |
@@ -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 | ); |
@@ -1535,14 +1535,14 @@ discard block |
||
1535 | 1535 | $output['quickbuttons'] = array( |
1536 | 1536 | 'quote' => array( |
1537 | 1537 | 'label' => $txt['quote_action'], |
1538 | - 'href' => $scripturl.'?action=post;quote='.$output['id'].';topic='.$context['current_topic'], '.'.$context['start'].';last_msg='.$context['topic_last_message'], |
|
1539 | - 'javascript' => 'onclick="return oQuickReply.quote('.$output['id'].');"', |
|
1538 | + 'href' => $scripturl . '?action=post;quote=' . $output['id'] . ';topic=' . $context['current_topic'], '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], |
|
1539 | + 'javascript' => 'onclick="return oQuickReply.quote(' . $output['id'] . ');"', |
|
1540 | 1540 | 'icon' => 'quote', |
1541 | 1541 | 'show' => $context['can_quote'] |
1542 | 1542 | ), |
1543 | 1543 | 'quote_selected' => array( |
1544 | 1544 | 'label' => $txt['quote_selected_action'], |
1545 | - 'id' => 'quoteSelected_'. $output['id'], |
|
1545 | + 'id' => 'quoteSelected_' . $output['id'], |
|
1546 | 1546 | 'href' => 'javascript:void(0)', |
1547 | 1547 | 'custom' => 'style="display:none"', |
1548 | 1548 | 'icon' => 'quote_selected', |
@@ -1551,74 +1551,74 @@ discard block |
||
1551 | 1551 | 'quick_edit' => array( |
1552 | 1552 | 'label' => $txt['quick_edit'], |
1553 | 1553 | 'class' => 'quick_edit', |
1554 | - 'id' => 'modify_button_'. $output['id'], |
|
1555 | - 'custom' => 'onclick="oQuickModify.modifyMsg(\''.$output['id'].'\', \''.!empty($modSettings['toggle_subject']).'\')"', |
|
1554 | + 'id' => 'modify_button_' . $output['id'], |
|
1555 | + 'custom' => 'onclick="oQuickModify.modifyMsg(\'' . $output['id'] . '\', \'' . !empty($modSettings['toggle_subject']) . '\')"', |
|
1556 | 1556 | 'icon' => 'quick_edit_button', |
1557 | 1557 | 'show' => $output['can_modify'] |
1558 | 1558 | ), |
1559 | 1559 | 'more' => array( |
1560 | 1560 | 'modify' => array( |
1561 | 1561 | 'label' => $txt['modify'], |
1562 | - 'href' => $scripturl.'?action=post;msg='.$output['id'].';topic='.$context['current_topic'].'.'.$context['start'], |
|
1562 | + 'href' => $scripturl . '?action=post;msg=' . $output['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'], |
|
1563 | 1563 | 'icon' => 'modify_button', |
1564 | 1564 | 'show' => $output['can_modify'] |
1565 | 1565 | ), |
1566 | 1566 | 'remove_topic' => array( |
1567 | 1567 | 'label' => $txt['remove_topic'], |
1568 | - 'href' => $scripturl.'?action=removetopic2;topic='.$context['current_topic'].'.'.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
1569 | - 'javascript' => 'data-confirm="'.$txt['are_sure_remove_topic'].'"', |
|
1568 | + 'href' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1569 | + 'javascript' => 'data-confirm="' . $txt['are_sure_remove_topic'] . '"', |
|
1570 | 1570 | 'class' => 'you_sure', |
1571 | 1571 | 'icon' => 'remove_button', |
1572 | 1572 | 'show' => $context['can_delete'] && ($context['topic_first_message'] == $output['id']) |
1573 | 1573 | ), |
1574 | 1574 | 'remove' => array( |
1575 | 1575 | 'label' => $txt['remove'], |
1576 | - 'href' => $scripturl.'?action=deletemsg;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
1577 | - 'javascript' => 'data-confirm="'.$txt['remove_message_question'].'"', |
|
1576 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1577 | + 'javascript' => 'data-confirm="' . $txt['remove_message_question'] . '"', |
|
1578 | 1578 | 'class' => 'you_sure', |
1579 | 1579 | 'icon' => 'remove_button', |
1580 | 1580 | 'show' => $output['can_remove'] && ($context['topic_first_message'] != $output['id']) |
1581 | 1581 | ), |
1582 | 1582 | 'split' => array( |
1583 | 1583 | 'label' => $txt['split'], |
1584 | - 'href' => $scripturl.'?action=splittopics;topic='.$context['current_topic'].'.0;at='.$output['id'], |
|
1584 | + 'href' => $scripturl . '?action=splittopics;topic=' . $context['current_topic'] . '.0;at=' . $output['id'], |
|
1585 | 1585 | 'icon' => 'split_button', |
1586 | 1586 | 'show' => $context['can_split'] && !empty($context['real_num_replies']) |
1587 | 1587 | ), |
1588 | 1588 | 'report' => array( |
1589 | 1589 | 'label' => $txt['report_to_mod'], |
1590 | - 'href' => $scripturl.'?action=reporttm;topic='.$context['current_topic'].'.'.$output['counter'].';msg='.$output['id'], |
|
1590 | + 'href' => $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $output['counter'] . ';msg=' . $output['id'], |
|
1591 | 1591 | 'icon' => 'error', |
1592 | 1592 | 'show' => $context['can_report_moderator'] |
1593 | 1593 | ), |
1594 | 1594 | 'warn' => array( |
1595 | 1595 | 'label' => $txt['issue_warning'], |
1596 | - 'href' => $scripturl.'?action=profile;area=issuewarning;u='.$output['member']['id'].';msg='.$output['id'], |
|
1596 | + 'href' => $scripturl . '?action=profile;area=issuewarning;u=' . $output['member']['id'] . ';msg=' . $output['id'], |
|
1597 | 1597 | 'icon' => 'warn_button', |
1598 | 1598 | 'show' => $context['can_issue_warning'] && !$output['is_message_author'] && !$output['member']['is_guest'] |
1599 | 1599 | ), |
1600 | 1600 | 'restore' => array( |
1601 | 1601 | 'label' => $txt['restore_message'], |
1602 | - 'href' => $scripturl.'?action=restoretopic;msgs='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
1602 | + 'href' => $scripturl . '?action=restoretopic;msgs=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1603 | 1603 | 'icon' => 'restore_button', |
1604 | 1604 | 'show' => $context['can_restore_msg'] |
1605 | 1605 | ), |
1606 | 1606 | 'approve' => array( |
1607 | 1607 | 'label' => $txt['approve'], |
1608 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
1608 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1609 | 1609 | 'icon' => 'approve_button', |
1610 | 1610 | 'show' => $output['can_approve'] |
1611 | 1611 | ), |
1612 | 1612 | 'unapprove' => array( |
1613 | 1613 | 'label' => $txt['unapprove'], |
1614 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
1614 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1615 | 1615 | 'icon' => 'unapprove_button', |
1616 | 1616 | 'show' => $output['can_unapprove'] |
1617 | 1617 | ), |
1618 | 1618 | ), |
1619 | 1619 | 'quickmod' => array( |
1620 | 1620 | 'class' => 'inline_mod_check', |
1621 | - 'id' => 'in_topic_mod_check_'. $output['id'], |
|
1621 | + 'id' => 'in_topic_mod_check_' . $output['id'], |
|
1622 | 1622 | 'custom' => 'style="display: none;"', |
1623 | 1623 | 'content' => '', |
1624 | 1624 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $output['can_remove'] |