@@ -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'); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | // Cookies... |
478 | 478 | array('cookiename', $txt['cookie_name'], 'file', 'text', 20), |
479 | 479 | array('cookieTime', $txt['cookieTime'], 'db', 'select', array_filter(array_map( |
480 | - function ($str) use ($txt) |
|
480 | + function($str) use ($txt) |
|
481 | 481 | { |
482 | 482 | return isset($txt[$str]) ? $txt[$str] : ''; |
483 | 483 | }, |
@@ -1439,7 +1439,7 @@ discard block |
||
1439 | 1439 | // Obviously, we don't need null here. |
1440 | 1440 | $def['type'] = array_filter( |
1441 | 1441 | $def['type'], |
1442 | - function ($type) |
|
1442 | + function($type) |
|
1443 | 1443 | { |
1444 | 1444 | return $type !== 'NULL'; |
1445 | 1445 | } |
@@ -1765,7 +1765,7 @@ discard block |
||
1765 | 1765 | $cacheAPIdir = $sourcedir . '/Cache'; |
1766 | 1766 | |
1767 | 1767 | $loadedApis = array(); |
1768 | - $apis_dir = $cacheAPIdir .'/'. CacheApi::APIS_FOLDER; |
|
1768 | + $apis_dir = $cacheAPIdir . '/' . CacheApi::APIS_FOLDER; |
|
1769 | 1769 | |
1770 | 1770 | $api_classes = new GlobIterator($apis_dir . '/*.php', FilesystemIterator::NEW_CURRENT_AND_KEY); |
1771 | 1771 |
@@ -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 | { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | require_once($sourcedir . '/Subs-Compat.php'); |
83 | 83 | |
84 | 84 | // If $maintenance is set specifically to 2, then we're upgrading or something. |
85 | -if (!empty($maintenance) && 2 === $maintenance) |
|
85 | +if (!empty($maintenance) && 2 === $maintenance) |
|
86 | 86 | { |
87 | 87 | display_maintenance_message(); |
88 | 88 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * |
99 | 99 | * @param string $class The fully-qualified class name. |
100 | 100 | */ |
101 | -spl_autoload_register(function ($class) use ($sourcedir) |
|
101 | +spl_autoload_register(function($class) use ($sourcedir) |
|
102 | 102 | { |
103 | 103 | $classMap = array( |
104 | 104 | 'ReCaptcha\\' => 'ReCaptcha/', |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | { |
380 | 380 | $val = 'CASE '; |
381 | 381 | foreach ($members as $k => $v) |
382 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
382 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
383 | 383 | |
384 | 384 | $val = $val . ' END'; |
385 | 385 | $type = 'raw'; |
@@ -850,11 +850,11 @@ discard block |
||
850 | 850 | // Anything that isn't a specification, punctuation mark, or whitespace. |
851 | 851 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
852 | 852 | // A series of punctuation marks (except %), possibly separated by whitespace. |
853 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
853 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
854 | 854 | // Unwanted trailing punctuation and whitespace. |
855 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
855 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
856 | 856 | // Unwanted opening punctuation and whitespace. |
857 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
857 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
858 | 858 | ), |
859 | 859 | array( |
860 | 860 | '', |
@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | { |
1158 | 1158 | $dates[$tzid . '_' . $timestamp]['results'][$format] = preg_replace_callback( |
1159 | 1159 | '/\xEE\x84\xA0([\d_]+)(\xEE\x84(?:[\xA1-\xAF]))/', |
1160 | - function ($matches) |
|
1160 | + function($matches) |
|
1161 | 1161 | { |
1162 | 1162 | switch ($matches[2]) |
1163 | 1163 | { |
@@ -1291,7 +1291,7 @@ discard block |
||
1291 | 1291 | elseif (!empty($context['character_set']) && is_callable('mb_decode_numericentity')) |
1292 | 1292 | { |
1293 | 1293 | // Get whatever the default replacement character is for this encoding. |
1294 | - $substitute = mb_decode_numericentity('�', array(0xFFFD,0xFFFD,0,0xFFFF), $context['character_set']); |
|
1294 | + $substitute = mb_decode_numericentity('�', array(0xFFFD, 0xFFFD, 0, 0xFFFF), $context['character_set']); |
|
1295 | 1295 | } |
1296 | 1296 | else |
1297 | 1297 | $substitute = '?'; |
@@ -1740,7 +1740,7 @@ discard block |
||
1740 | 1740 | |
1741 | 1741 | // parseAttachBBC will return a string ($txt key) rather than dying with a fatal_error. Up to you to decide what to do. |
1742 | 1742 | if (is_string($currentAttachment)) |
1743 | - return $data = '<span style="display:inline-block" class="errorbox">' . (!empty($txt[$currentAttachment]) ? $txt[$currentAttachment] : $currentAttachment) . '</span>'; |
|
1743 | + return $data = '<span style="display:inline-block" class="errorbox">' . (!empty($txt[$currentAttachment]) ? $txt[$currentAttachment] : $currentAttachment) . '</span>'; |
|
1744 | 1744 | |
1745 | 1745 | // We need a display mode. |
1746 | 1746 | if (empty($params['{display}'])) |
@@ -1766,7 +1766,7 @@ discard block |
||
1766 | 1766 | $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">'; |
1767 | 1767 | else |
1768 | 1768 | { |
1769 | - $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': ''; |
|
1769 | + $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
|
1770 | 1770 | $height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : ''; |
1771 | 1771 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>'; |
1772 | 1772 | } |
@@ -1777,7 +1777,7 @@ discard block |
||
1777 | 1777 | $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
1778 | 1778 | $height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : ''; |
1779 | 1779 | |
1780 | - $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>' : ''); |
|
1780 | + $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>' : ''); |
|
1781 | 1781 | } |
1782 | 1782 | // Audio. |
1783 | 1783 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1785,7 +1785,7 @@ discard block |
||
1785 | 1785 | $width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;'; |
1786 | 1786 | $height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : ''; |
1787 | 1787 | |
1788 | - $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>'; |
|
1788 | + $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>'; |
|
1789 | 1789 | } |
1790 | 1790 | // Anything else. |
1791 | 1791 | else |
@@ -1954,7 +1954,7 @@ discard block |
||
1954 | 1954 | 'type' => 'unparsed_commas_content', |
1955 | 1955 | 'test' => '\d+,\d+\]', |
1956 | 1956 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1957 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1957 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1958 | 1958 | { |
1959 | 1959 | $data[0] = normalize_iri($data[0]); |
1960 | 1960 | |
@@ -2080,8 +2080,8 @@ discard block |
||
2080 | 2080 | else |
2081 | 2081 | $url = get_proxied_url($url); |
2082 | 2082 | |
2083 | - $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""'; |
|
2084 | - $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
2083 | + $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""'; |
|
2084 | + $title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : ''; |
|
2085 | 2085 | |
2086 | 2086 | $data = isset($disabled[$tag['tag']]) ? $url : '<img src="' . $url . '"' . $alt . $title . $params['{width}'] . $params['{height}'] . ' class="bbc_img' . (!empty($params['{width}']) || !empty($params['{height}']) ? ' resized' : '') . '" loading="lazy">'; |
2087 | 2087 | }, |
@@ -2512,12 +2512,12 @@ discard block |
||
2512 | 2512 | $codes[] = array( |
2513 | 2513 | 'tag' => 'cowsay', |
2514 | 2514 | 'parameters' => array( |
2515 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2515 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2516 | 2516 | { |
2517 | 2517 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2518 | 2518 | }, |
2519 | 2519 | ), |
2520 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2520 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2521 | 2521 | { |
2522 | 2522 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2523 | 2523 | }, |
@@ -4222,7 +4222,7 @@ discard block |
||
4222 | 4222 | if ($fp != false) |
4223 | 4223 | { |
4224 | 4224 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
4225 | - 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"); |
|
4225 | + 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"); |
|
4226 | 4226 | |
4227 | 4227 | // Read in the HTTP/1.1 or whatever. |
4228 | 4228 | $test = substr(fgets($fp, 11), -1); |
@@ -4818,7 +4818,7 @@ discard block |
||
4818 | 4818 | |
4819 | 4819 | uasort( |
4820 | 4820 | $context['css_files'], |
4821 | - function ($a, $b) |
|
4821 | + function($a, $b) |
|
4822 | 4822 | { |
4823 | 4823 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4824 | 4824 | } |
@@ -6138,7 +6138,7 @@ discard block |
||
6138 | 6138 | { |
6139 | 6139 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
6140 | 6140 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6141 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6141 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6142 | 6142 | if ($keep_alive) |
6143 | 6143 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
6144 | 6144 | else |
@@ -6148,7 +6148,7 @@ discard block |
||
6148 | 6148 | { |
6149 | 6149 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
6150 | 6150 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6151 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6151 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6152 | 6152 | if ($keep_alive) |
6153 | 6153 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
6154 | 6154 | else |
@@ -6397,13 +6397,13 @@ discard block |
||
6397 | 6397 | |
6398 | 6398 | // UTF-8 occurences of MS special characters |
6399 | 6399 | $findchars_utf8 = array( |
6400 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
6401 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
6402 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
6403 | - "\xe2\x80\x98", // left single curly quote |
|
6404 | - "\xe2\x80\x99", // right single curly quote |
|
6405 | - "\xe2\x80\x9c", // left double curly quote |
|
6406 | - "\xe2\x80\x9d", // right double curly quote |
|
6400 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
6401 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
6402 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
6403 | + "\xe2\x80\x98", // left single curly quote |
|
6404 | + "\xe2\x80\x99", // right single curly quote |
|
6405 | + "\xe2\x80\x9c", // left double curly quote |
|
6406 | + "\xe2\x80\x9d", // right double curly quote |
|
6407 | 6407 | ); |
6408 | 6408 | |
6409 | 6409 | // windows 1252 / iso equivalents |
@@ -6419,13 +6419,13 @@ discard block |
||
6419 | 6419 | |
6420 | 6420 | // safe replacements |
6421 | 6421 | $replacechars = array( |
6422 | - ',', // ‚ |
|
6423 | - ',,', // „ |
|
6424 | - '...', // … |
|
6425 | - "'", // ‘ |
|
6426 | - "'", // ’ |
|
6427 | - '"', // “ |
|
6428 | - '"', // ” |
|
6422 | + ',', // ‚ |
|
6423 | + ',,', // „ |
|
6424 | + '...', // … |
|
6425 | + "'", // ‘ |
|
6426 | + "'", // ’ |
|
6427 | + '"', // “ |
|
6428 | + '"', // ” |
|
6429 | 6429 | ); |
6430 | 6430 | |
6431 | 6431 | if ($context['utf8']) |
@@ -6788,7 +6788,7 @@ discard block |
||
6788 | 6788 | // We don't want abbreviations like '+03' or '-11'. |
6789 | 6789 | $abbrs = array_filter( |
6790 | 6790 | $tzvalue['abbrs'], |
6791 | - function ($abbr) |
|
6791 | + function($abbr) |
|
6792 | 6792 | { |
6793 | 6793 | return !strspn($abbr, '+-'); |
6794 | 6794 | } |
@@ -7777,7 +7777,7 @@ discard block |
||
7777 | 7777 | EXISTS ( |
7778 | 7778 | SELECT bpv.id_board |
7779 | 7779 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7780 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7780 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7781 | 7781 | AND bpv.deny = 0 |
7782 | 7782 | AND bpv.id_board = b.id_board |
7783 | 7783 | )'; |
@@ -7787,7 +7787,7 @@ discard block |
||
7787 | 7787 | AND NOT EXISTS ( |
7788 | 7788 | SELECT bpv.id_board |
7789 | 7789 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7790 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7790 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7791 | 7791 | AND bpv.deny = 1 |
7792 | 7792 | AND bpv.id_board = b.id_board |
7793 | 7793 | )'; |
@@ -8196,8 +8196,8 @@ discard block |
||
8196 | 8196 | $i = 0; |
8197 | 8197 | while (empty($done)) |
8198 | 8198 | { |
8199 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
8200 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
8199 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
8200 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
8201 | 8201 | else |
8202 | 8202 | $done = true; |
8203 | 8203 | } |
@@ -8207,8 +8207,8 @@ discard block |
||
8207 | 8207 | $i = 0; |
8208 | 8208 | while (empty($done)) |
8209 | 8209 | { |
8210 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
8211 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
8210 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
8211 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
8212 | 8212 | else |
8213 | 8213 | $done = true; |
8214 | 8214 | } |
@@ -8389,7 +8389,7 @@ discard block |
||
8389 | 8389 | if (empty($stringSubject)) |
8390 | 8390 | return ''; |
8391 | 8391 | |
8392 | - $translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches); |
|
8392 | + $translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches); |
|
8393 | 8393 | $toFind = array(); |
8394 | 8394 | $replaceWith = array(); |
8395 | 8395 |