@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | global $context, $scripturl, $txt, $settings, $options, $modSettings; |
278 | 278 | |
279 | 279 | echo ' |
280 | - <div class="windowbg" id="msg', $message['id'],'"> |
|
280 | + <div class="windowbg" id="msg', $message['id'], '"> |
|
281 | 281 | <div class="post_wrapper"> |
282 | 282 | <div class="poster">'; |
283 | 283 | |
@@ -1959,7 +1959,7 @@ discard block |
||
1959 | 1959 | <div class="smalltext"> |
1960 | 1960 | <div class="recipient_to"><strong>', $txt['to'], ':</strong> ', implode(', ', $draft['recipients']['to']), '</div>'; |
1961 | 1961 | |
1962 | - if(!empty($draft['recipients']['bcc'])) |
|
1962 | + if (!empty($draft['recipients']['bcc'])) |
|
1963 | 1963 | echo' |
1964 | 1964 | <div class="pm_bbc"><strong>', $txt['pm_bcc'], ':</strong> ', implode(', ', $draft['recipients']['bcc']), '</div>'; |
1965 | 1965 |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | // Filter out any redundant separators before we start the loop |
759 | 759 | $context['config_vars'] = array_filter( |
760 | 760 | $context['config_vars'], |
761 | - function ($v) use ($context) |
|
761 | + function($v) use ($context) |
|
762 | 762 | { |
763 | 763 | static $config_vars, $prev; |
764 | 764 | |
@@ -1659,7 +1659,7 @@ discard block |
||
1659 | 1659 | echo ' |
1660 | 1660 | <form action="' . $scripturl . '?action=admin;area=search" method="post" accept-charset="' . $context['character_set'] . '" class="admin_search"> |
1661 | 1661 | <span class="main_icons filter centericon"></span> |
1662 | - <input type="search" name="search_term" placeholder="', $txt['admin_search'], '"', isset($context['search_term']) ? ' value="' . $context['search_term'] . '"' : '','> |
|
1662 | + <input type="search" name="search_term" placeholder="', $txt['admin_search'], '"', isset($context['search_term']) ? ' value="' . $context['search_term'] . '"' : '', '> |
|
1663 | 1663 | <select name="search_type"> |
1664 | 1664 | <option value="internal"', (empty($context['admin_preferences']['sb']) || $context['admin_preferences']['sb'] == 'internal' ? ' selected' : ''), '>', $txt['admin_search_type_internal'], '</option> |
1665 | 1665 | <option value="member"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'member' ? ' selected' : ''), '>', $txt['admin_search_type_member'], '</option> |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | 'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'], |
854 | 854 | 'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1, |
855 | 855 | 'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0, |
856 | - 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0, |
|
856 | + 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0, |
|
857 | 857 | 'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0, |
858 | 858 | ), |
859 | 859 | 'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '', |
@@ -2539,7 +2539,7 @@ discard block |
||
2539 | 2539 | ); |
2540 | 2540 | |
2541 | 2541 | // Add the JQuery library to the list of files to load. |
2542 | - $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'); |
|
2542 | + $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'); |
|
2543 | 2543 | |
2544 | 2544 | if (isset($modSettings['jquery_source']) && array_key_exists($modSettings['jquery_source'], $jQueryUrls)) |
2545 | 2545 | loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery'); |
@@ -2780,8 +2780,7 @@ discard block |
||
2780 | 2780 | $context['css_files_order'] = array(); |
2781 | 2781 | |
2782 | 2782 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2783 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2784 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2783 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2785 | 2784 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2786 | 2785 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2787 | 2786 | $params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true; |
@@ -2896,8 +2895,7 @@ discard block |
||
2896 | 2895 | global $settings, $context, $modSettings; |
2897 | 2896 | |
2898 | 2897 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2899 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2900 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2898 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2901 | 2899 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2902 | 2900 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2903 | 2901 | $params['async'] = isset($params['async']) ? $params['async'] : false; |
@@ -3687,8 +3685,7 @@ discard block |
||
3687 | 3685 | |
3688 | 3686 | // What accelerator we are going to try. |
3689 | 3687 | $cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT; |
3690 | - $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : |
|
3691 | - CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3688 | + $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3692 | 3689 | |
3693 | 3690 | // Do some basic tests. |
3694 | 3691 | if (class_exists($fully_qualified_class_name)) |
@@ -3992,7 +3989,7 @@ discard block |
||
3992 | 3989 | $auth_secret = hash_file('sha256', $boarddir . '/Settings.php'); |
3993 | 3990 | |
3994 | 3991 | // Set the last error to now, but only every 15 minutes. Don't need to flood the logs. |
3995 | - if (empty($db_last_error) || ($db_last_error + 60*15) <= time()) |
|
3992 | + if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time()) |
|
3996 | 3993 | { |
3997 | 3994 | updateDbLastError(time()); |
3998 | 3995 | loadLanguage('Errors'); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | // Set a list of common functions. |
108 | 108 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
109 | 109 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
110 | - { |
|
110 | + { |
|
111 | 111 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', (string) $string); |
112 | 112 | return $string; |
113 | 113 | } : function($string) |
@@ -2422,7 +2422,6 @@ discard block |
||
2422 | 2422 | loadLanguage('index+Modifications'); |
2423 | 2423 | $context['template_layers'] = array(); |
2424 | 2424 | } |
2425 | - |
|
2426 | 2425 | else |
2427 | 2426 | { |
2428 | 2427 | // Custom templates to load, or just default? |
@@ -2976,7 +2975,8 @@ discard block |
||
2976 | 2975 | // Take care of escaping the value for JavaScript? |
2977 | 2976 | if (!empty($escape)) |
2978 | 2977 | { |
2979 | - switch (gettype($value)) { |
|
2978 | + switch (gettype($value)) |
|
2979 | + { |
|
2980 | 2980 | // Illegal. |
2981 | 2981 | case 'resource': |
2982 | 2982 | break; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | ', sprintf($txt['welcome_to_forum'], $context['forum_name_html_safe']), ' |
274 | 274 | </li> |
275 | 275 | <li class="button_login"> |
276 | - <a href="', $scripturl, '?action=login" class="', $context['current_action'] == 'login' ? 'active' : 'open','" onclick="return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ', \'login\');"> |
|
276 | + <a href="', $scripturl, '?action=login" class="', $context['current_action'] == 'login' ? 'active' : 'open', '" onclick="return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ', \'login\');"> |
|
277 | 277 | <span class="main_icons login"></span> |
278 | 278 | <span class="textmenu">', $txt['login'], '</span> |
279 | 279 | </a> |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | if ($context['can_register']) |
283 | 283 | echo ' |
284 | 284 | <li class="button_signup"> |
285 | - <a href="', $scripturl, '?action=signup" class="', $context['current_action'] == 'signup' ? 'active' : 'open','"> |
|
285 | + <a href="', $scripturl, '?action=signup" class="', $context['current_action'] == 'signup' ? 'active' : 'open', '"> |
|
286 | 286 | <span class="main_icons regcenter"></span> |
287 | 287 | <span class="textmenu">', $txt['register'], '</span> |
288 | 288 | </a> |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | $value['id'] = $key; |
637 | 637 | |
638 | 638 | $button = ' |
639 | - <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>'.(!empty($value['icon']) ? '<span class="main_icons '.$value['icon'].'"></span>' : '').'' . $txt[$value['text']] . '</a>'; |
|
639 | + <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . (!empty($value['icon']) ? '<span class="main_icons ' . $value['icon'] . '"></span>' : '') . '' . $txt[$value['text']] . '</a>'; |
|
640 | 640 | |
641 | 641 | if (!empty($value['sub_buttons'])) |
642 | 642 | { |