@@ -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 | |
@@ -1946,7 +1946,7 @@ discard block |
||
1946 | 1946 | <div class="floatright smalltext righttext"> |
1947 | 1947 | <div class="recipient_to">« <strong>', $txt['to'], ':</strong> ', implode(', ', $draft['recipients']['to']), ' »</div>'; |
1948 | 1948 | |
1949 | - if(!empty($draft['recipients']['bcc'])) |
|
1949 | + if (!empty($draft['recipients']['bcc'])) |
|
1950 | 1950 | echo' |
1951 | 1951 | <div class="pm_bbc">« <strong>', $txt['pm_bcc'], ':</strong> ', implode(', ', $draft['recipients']['bcc']), ' »</div>'; |
1952 | 1952 |
@@ -814,7 +814,7 @@ discard block |
||
814 | 814 | 'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'], |
815 | 815 | 'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1, |
816 | 816 | 'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0, |
817 | - 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0, |
|
817 | + 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0, |
|
818 | 818 | 'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0, |
819 | 819 | ), |
820 | 820 | 'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '', |
@@ -2471,7 +2471,7 @@ discard block |
||
2471 | 2471 | ); |
2472 | 2472 | |
2473 | 2473 | // Add the JQuery library to the list of files to load. |
2474 | - $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'); |
|
2474 | + $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'); |
|
2475 | 2475 | |
2476 | 2476 | if (isset($modSettings['jquery_source']) && array_key_exists($modSettings['jquery_source'], $jQueryUrls)) |
2477 | 2477 | loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery'); |
@@ -2712,8 +2712,7 @@ discard block |
||
2712 | 2712 | $context['css_files_order'] = array(); |
2713 | 2713 | |
2714 | 2714 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2715 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2716 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2715 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2717 | 2716 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2718 | 2717 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2719 | 2718 | $params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true; |
@@ -2828,8 +2827,7 @@ discard block |
||
2828 | 2827 | global $settings, $context, $modSettings; |
2829 | 2828 | |
2830 | 2829 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2831 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2832 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2830 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2833 | 2831 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2834 | 2832 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2835 | 2833 | $params['async'] = isset($params['async']) ? $params['async'] : false; |
@@ -2934,7 +2932,7 @@ discard block |
||
2934 | 2932 | $elements[] = JavaScriptEscape($element); |
2935 | 2933 | } |
2936 | 2934 | |
2937 | - $value = '[' . implode(', ',$elements) . ']'; |
|
2935 | + $value = '[' . implode(', ', $elements) . ']'; |
|
2938 | 2936 | } |
2939 | 2937 | } |
2940 | 2938 | |
@@ -3615,8 +3613,7 @@ discard block |
||
3615 | 3613 | |
3616 | 3614 | // What accelerator we are going to try. |
3617 | 3615 | $cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT; |
3618 | - $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : |
|
3619 | - CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3616 | + $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3620 | 3617 | |
3621 | 3618 | // Do some basic tests. |
3622 | 3619 | if (class_exists($fully_qualified_class_name)) |
@@ -3920,7 +3917,7 @@ discard block |
||
3920 | 3917 | $auth_secret = hash_file('sha256', $boarddir . '/Settings.php'); |
3921 | 3918 | |
3922 | 3919 | // Set the last error to now, but only every 15 minutes. Don't need to flood the logs. |
3923 | - if (empty($db_last_error) || ($db_last_error + 60*15) <= time()) |
|
3920 | + if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time()) |
|
3924 | 3921 | { |
3925 | 3922 | updateDbLastError(time()); |
3926 | 3923 | 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? |
@@ -280,7 +280,6 @@ discard block |
||
280 | 280 | $condition = 'id_member IN ({array_int:members})'; |
281 | 281 | $parameters['members'] = $members; |
282 | 282 | } |
283 | - |
|
284 | 283 | elseif ($members === null) |
285 | 284 | $condition = '1=1'; |
286 | 285 | |
@@ -383,11 +382,9 @@ discard block |
||
383 | 382 | $val = $val . ' END'; |
384 | 383 | $type = 'raw'; |
385 | 384 | } |
386 | - |
|
387 | 385 | else |
388 | 386 | $val = alert_count($members, true); |
389 | 387 | } |
390 | - |
|
391 | 388 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
392 | 389 | { |
393 | 390 | $val = $var . ' ' . $val . ' 1'; |
@@ -2167,12 +2164,12 @@ discard block |
||
2167 | 2164 | 'tag' => 'cowsay', |
2168 | 2165 | 'parameters' => array( |
2169 | 2166 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2170 | - { |
|
2167 | + { |
|
2171 | 2168 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2172 | 2169 | }, |
2173 | 2170 | ), |
2174 | 2171 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2175 | - { |
|
2172 | + { |
|
2176 | 2173 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2177 | 2174 | }, |
2178 | 2175 | ), |
@@ -2500,7 +2497,8 @@ discard block |
||
2500 | 2497 | |
2501 | 2498 | foreach (array('path', 'query', 'fragment') as $part) |
2502 | 2499 | { |
2503 | - switch ($part) { |
|
2500 | + switch ($part) |
|
2501 | + { |
|
2504 | 2502 | case 'path': |
2505 | 2503 | $part_disallowed_chars = '\h\v<>' . $bracket_quote_chars . $excluded_trailing_chars . '/#&'; |
2506 | 2504 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -2817,7 +2815,9 @@ discard block |
||
2817 | 2815 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
2818 | 2816 | |
2819 | 2817 | // A closing tag that doesn't match any open tags? Skip it. |
2820 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
2818 | + if (!in_array($look_for, array_map(function($code) |
|
2819 | + { |
|
2820 | +return $code['tag']; }, $open_tags))) |
|
2821 | 2821 | continue; |
2822 | 2822 | |
2823 | 2823 | $to_close = array(); |
@@ -4357,7 +4357,6 @@ discard block |
||
4357 | 4357 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4358 | 4358 | $minSeed = $js_file['options']['seed']; |
4359 | 4359 | } |
4360 | - |
|
4361 | 4360 | else |
4362 | 4361 | { |
4363 | 4362 | echo ' |
@@ -6287,7 +6286,8 @@ discard block |
||
6287 | 6286 | $zones[$tzkey]['tzid'] = $tzid; |
6288 | 6287 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
6289 | 6288 | |
6290 | - foreach ($tzinfo as $transition) { |
|
6289 | + foreach ($tzinfo as $transition) |
|
6290 | + { |
|
6291 | 6291 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
6292 | 6292 | } |
6293 | 6293 | |
@@ -6791,7 +6791,6 @@ discard block |
||
6791 | 6791 | $isWritable = true; |
6792 | 6792 | break; |
6793 | 6793 | } |
6794 | - |
|
6795 | 6794 | else |
6796 | 6795 | @chmod($file, $val); |
6797 | 6796 | } |
@@ -7880,7 +7879,8 @@ discard block |
||
7880 | 7879 | $replaceWith = array(); |
7881 | 7880 | |
7882 | 7881 | if (!empty($matches[1])) |
7883 | - foreach ($matches[1] as $token) { |
|
7882 | + foreach ($matches[1] as $token) |
|
7883 | + { |
|
7884 | 7884 | $toFind[] = '{' . $token . '}'; |
7885 | 7885 | $replaceWith[] = isset($txt[$token]) ? $txt[$token] : $token; |
7886 | 7886 | } |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | { |
379 | 379 | $val = 'CASE '; |
380 | 380 | foreach ($members as $k => $v) |
381 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
381 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
382 | 382 | |
383 | 383 | $val = $val . ' END'; |
384 | 384 | $type = 'raw'; |
@@ -868,11 +868,11 @@ discard block |
||
868 | 868 | // Anything that isn't a specification, punctuation mark, or whitespace. |
869 | 869 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
870 | 870 | // A series of punctuation marks (except %), possibly separated by whitespace. |
871 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
871 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
872 | 872 | // Unwanted trailing punctuation and whitespace. |
873 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
873 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
874 | 874 | // Unwanted opening punctuation and whitespace. |
875 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
875 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
876 | 876 | ), |
877 | 877 | array( |
878 | 878 | '', |
@@ -1175,7 +1175,7 @@ discard block |
||
1175 | 1175 | { |
1176 | 1176 | $dates[$tzid . '_' . $timestamp]['results'][$format] = preg_replace_callback( |
1177 | 1177 | '/\xEE\x84\xA0([\d_]+)(\xEE\x84(?:[\xA1-\xAF]))/', |
1178 | - function ($matches) |
|
1178 | + function($matches) |
|
1179 | 1179 | { |
1180 | 1180 | switch ($matches[2]) |
1181 | 1181 | { |
@@ -1309,7 +1309,7 @@ discard block |
||
1309 | 1309 | elseif (!empty($context['character_set']) && is_callable('mb_decode_numericentity')) |
1310 | 1310 | { |
1311 | 1311 | // Get whatever the default replacement character is for this encoding. |
1312 | - $substitute = mb_decode_numericentity('�', array(0xFFFD,0xFFFD,0,0xFFFF), $context['character_set']); |
|
1312 | + $substitute = mb_decode_numericentity('�', array(0xFFFD, 0xFFFD, 0, 0xFFFF), $context['character_set']); |
|
1313 | 1313 | } |
1314 | 1314 | else |
1315 | 1315 | $substitute = '?'; |
@@ -1794,7 +1794,7 @@ discard block |
||
1794 | 1794 | $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">'; |
1795 | 1795 | else |
1796 | 1796 | { |
1797 | - $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': ''; |
|
1797 | + $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
|
1798 | 1798 | $height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : ''; |
1799 | 1799 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>'; |
1800 | 1800 | } |
@@ -1805,7 +1805,7 @@ discard block |
||
1805 | 1805 | $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
1806 | 1806 | $height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : ''; |
1807 | 1807 | |
1808 | - $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>' : ''); |
|
1808 | + $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>' : ''); |
|
1809 | 1809 | } |
1810 | 1810 | // Audio. |
1811 | 1811 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1813,7 +1813,7 @@ discard block |
||
1813 | 1813 | $width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;'; |
1814 | 1814 | $height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : ''; |
1815 | 1815 | |
1816 | - $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>'; |
|
1816 | + $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>'; |
|
1817 | 1817 | } |
1818 | 1818 | // Anything else. |
1819 | 1819 | else |
@@ -1982,7 +1982,7 @@ discard block |
||
1982 | 1982 | 'type' => 'unparsed_commas_content', |
1983 | 1983 | 'test' => '\d+,\d+\]', |
1984 | 1984 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1985 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1985 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1986 | 1986 | { |
1987 | 1987 | $data[0] = normalize_iri($data[0]); |
1988 | 1988 | |
@@ -2108,8 +2108,8 @@ discard block |
||
2108 | 2108 | else |
2109 | 2109 | $url = get_proxied_url($url); |
2110 | 2110 | |
2111 | - $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""'; |
|
2112 | - $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
2111 | + $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""'; |
|
2112 | + $title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : ''; |
|
2113 | 2113 | |
2114 | 2114 | $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">'; |
2115 | 2115 | }, |
@@ -2540,12 +2540,12 @@ discard block |
||
2540 | 2540 | $codes[] = array( |
2541 | 2541 | 'tag' => 'cowsay', |
2542 | 2542 | 'parameters' => array( |
2543 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2543 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2544 | 2544 | { |
2545 | 2545 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2546 | 2546 | }, |
2547 | 2547 | ), |
2548 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2548 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2549 | 2549 | { |
2550 | 2550 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2551 | 2551 | }, |
@@ -4250,7 +4250,7 @@ discard block |
||
4250 | 4250 | if ($fp != false) |
4251 | 4251 | { |
4252 | 4252 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
4253 | - 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"); |
|
4253 | + 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"); |
|
4254 | 4254 | |
4255 | 4255 | // Read in the HTTP/1.1 or whatever. |
4256 | 4256 | $test = substr(fgets($fp, 11), -1); |
@@ -4846,7 +4846,7 @@ discard block |
||
4846 | 4846 | |
4847 | 4847 | uasort( |
4848 | 4848 | $context['css_files'], |
4849 | - function ($a, $b) |
|
4849 | + function($a, $b) |
|
4850 | 4850 | { |
4851 | 4851 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4852 | 4852 | } |
@@ -6143,7 +6143,7 @@ discard block |
||
6143 | 6143 | { |
6144 | 6144 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
6145 | 6145 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6146 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6146 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6147 | 6147 | if ($keep_alive) |
6148 | 6148 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
6149 | 6149 | else |
@@ -6153,7 +6153,7 @@ discard block |
||
6153 | 6153 | { |
6154 | 6154 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
6155 | 6155 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6156 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6156 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6157 | 6157 | if ($keep_alive) |
6158 | 6158 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
6159 | 6159 | else |
@@ -6402,13 +6402,13 @@ discard block |
||
6402 | 6402 | |
6403 | 6403 | // UTF-8 occurences of MS special characters |
6404 | 6404 | $findchars_utf8 = array( |
6405 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
6406 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
6407 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
6408 | - "\xe2\x80\x98", // left single curly quote |
|
6409 | - "\xe2\x80\x99", // right single curly quote |
|
6410 | - "\xe2\x80\x9c", // left double curly quote |
|
6411 | - "\xe2\x80\x9d", // right double curly quote |
|
6405 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
6406 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
6407 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
6408 | + "\xe2\x80\x98", // left single curly quote |
|
6409 | + "\xe2\x80\x99", // right single curly quote |
|
6410 | + "\xe2\x80\x9c", // left double curly quote |
|
6411 | + "\xe2\x80\x9d", // right double curly quote |
|
6412 | 6412 | ); |
6413 | 6413 | |
6414 | 6414 | // windows 1252 / iso equivalents |
@@ -6424,13 +6424,13 @@ discard block |
||
6424 | 6424 | |
6425 | 6425 | // safe replacements |
6426 | 6426 | $replacechars = array( |
6427 | - ',', // ‚ |
|
6428 | - ',,', // „ |
|
6429 | - '...', // … |
|
6430 | - "'", // ‘ |
|
6431 | - "'", // ’ |
|
6432 | - '"', // “ |
|
6433 | - '"', // ” |
|
6427 | + ',', // ‚ |
|
6428 | + ',,', // „ |
|
6429 | + '...', // … |
|
6430 | + "'", // ‘ |
|
6431 | + "'", // ’ |
|
6432 | + '"', // “ |
|
6433 | + '"', // ” |
|
6434 | 6434 | ); |
6435 | 6435 | |
6436 | 6436 | if ($context['utf8']) |
@@ -6791,7 +6791,7 @@ discard block |
||
6791 | 6791 | // We don't want abbreviations like '+03' or '-11'. |
6792 | 6792 | $abbrs = array_filter( |
6793 | 6793 | $tzvalue['abbrs'], |
6794 | - function ($abbr) |
|
6794 | + function($abbr) |
|
6795 | 6795 | { |
6796 | 6796 | return !strspn($abbr, '+-'); |
6797 | 6797 | } |
@@ -7780,7 +7780,7 @@ discard block |
||
7780 | 7780 | EXISTS ( |
7781 | 7781 | SELECT bpv.id_board |
7782 | 7782 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7783 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7783 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7784 | 7784 | AND bpv.deny = 0 |
7785 | 7785 | AND bpv.id_board = b.id_board |
7786 | 7786 | )'; |
@@ -7790,7 +7790,7 @@ discard block |
||
7790 | 7790 | AND NOT EXISTS ( |
7791 | 7791 | SELECT bpv.id_board |
7792 | 7792 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7793 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7793 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7794 | 7794 | AND bpv.deny = 1 |
7795 | 7795 | AND bpv.id_board = b.id_board |
7796 | 7796 | )'; |
@@ -8197,8 +8197,8 @@ discard block |
||
8197 | 8197 | $i = 0; |
8198 | 8198 | while (empty($done)) |
8199 | 8199 | { |
8200 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
8201 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
8200 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
8201 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
8202 | 8202 | else |
8203 | 8203 | $done = true; |
8204 | 8204 | } |
@@ -8208,8 +8208,8 @@ discard block |
||
8208 | 8208 | $i = 0; |
8209 | 8209 | while (empty($done)) |
8210 | 8210 | { |
8211 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
8212 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
8211 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
8212 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
8213 | 8213 | else |
8214 | 8214 | $done = true; |
8215 | 8215 | } |
@@ -8387,7 +8387,7 @@ discard block |
||
8387 | 8387 | if (empty($stringSubject)) |
8388 | 8388 | return ''; |
8389 | 8389 | |
8390 | - $translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches); |
|
8390 | + $translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches); |
|
8391 | 8391 | $toFind = array(); |
8392 | 8392 | $replaceWith = array(); |
8393 | 8393 |
@@ -256,7 +256,7 @@ |
||
256 | 256 | return array(); |
257 | 257 | |
258 | 258 | // preparse code does a few things which might mess with our parsing |
259 | - $body = htmlspecialchars_decode(preg_replace('~<br\s*/?'.'>~', "\n", str_replace(' ', ' ', $body)), ENT_QUOTES); |
|
259 | + $body = htmlspecialchars_decode(preg_replace('~<br\s*/?' . '>~', "\n", str_replace(' ', ' ', $body)), ENT_QUOTES); |
|
260 | 260 | |
261 | 261 | if (empty(self::$excluded_bbc_regex)) |
262 | 262 | self::setExcludedBbcRegex(); |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | $to = explode('/', $lang_dir); |
540 | 540 | $relPath = $to; |
541 | 541 | |
542 | - foreach($from as $depth => $dir) |
|
542 | + foreach ($from as $depth => $dir) |
|
543 | 543 | { |
544 | 544 | if ($dir === $to[$depth]) |
545 | 545 | array_shift($relPath); |
@@ -3043,94 +3043,94 @@ discard block |
||
3043 | 3043 | // Translation table for the character sets not native for MySQL. |
3044 | 3044 | $translation_tables = array( |
3045 | 3045 | 'windows-1255' => array( |
3046 | - '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
3047 | - '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
3048 | - '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
3049 | - '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
3050 | - '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
3051 | - '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
3052 | - '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
3053 | - '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
3054 | - '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
3055 | - '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
3056 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3057 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3058 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3059 | - '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
3060 | - '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
3061 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3062 | - '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
3063 | - '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
3064 | - '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
3065 | - '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
3066 | - '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
3067 | - '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
3068 | - '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
3069 | - '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
3070 | - '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
3071 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3072 | - '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
3073 | - '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3074 | - '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
3075 | - '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
3076 | - '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
3077 | - '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
3078 | - '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
3079 | - '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
3080 | - '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
3081 | - '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
3082 | - '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
3083 | - '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
3084 | - '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
3085 | - '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
3086 | - '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
3087 | - '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
3046 | + '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
3047 | + '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
3048 | + '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
3049 | + '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
3050 | + '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
3051 | + '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
3052 | + '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
3053 | + '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
3054 | + '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
3055 | + '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
3056 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3057 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3058 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3059 | + '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
3060 | + '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
3061 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3062 | + '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
3063 | + '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
3064 | + '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
3065 | + '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
3066 | + '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
3067 | + '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
3068 | + '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
3069 | + '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
3070 | + '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
3071 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3072 | + '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
3073 | + '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3074 | + '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
3075 | + '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
3076 | + '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
3077 | + '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
3078 | + '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
3079 | + '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
3080 | + '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
3081 | + '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
3082 | + '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
3083 | + '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
3084 | + '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
3085 | + '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
3086 | + '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
3087 | + '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
3088 | 3088 | '0xFA' => '0xD7AA', |
3089 | 3089 | ), |
3090 | 3090 | 'windows-1253' => array( |
3091 | - '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
3092 | - '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
3093 | - '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
3094 | - '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
3095 | - '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
3096 | - '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
3097 | - '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
3098 | - '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
3099 | - '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
3100 | - '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
3101 | - '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
3102 | - '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
3103 | - '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
3104 | - '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
3105 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3106 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3107 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3108 | - '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
3109 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3110 | - '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
3111 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3112 | - '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
3113 | - '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
3114 | - '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
3115 | - '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3116 | - '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
3117 | - '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
3118 | - '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
3119 | - '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
3120 | - '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
3121 | - '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
3122 | - '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
3123 | - '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
3124 | - '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
3125 | - '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
3126 | - '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
3127 | - '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
3128 | - '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
3129 | - '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
3130 | - '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
3131 | - '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
3132 | - '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
3133 | - '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
3091 | + '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
3092 | + '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
3093 | + '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
3094 | + '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
3095 | + '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
3096 | + '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
3097 | + '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
3098 | + '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
3099 | + '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
3100 | + '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
3101 | + '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
3102 | + '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
3103 | + '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
3104 | + '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
3105 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3106 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3107 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3108 | + '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
3109 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3110 | + '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
3111 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3112 | + '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
3113 | + '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
3114 | + '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
3115 | + '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3116 | + '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
3117 | + '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
3118 | + '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
3119 | + '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
3120 | + '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
3121 | + '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
3122 | + '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
3123 | + '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
3124 | + '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
3125 | + '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
3126 | + '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
3127 | + '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
3128 | + '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
3129 | + '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
3130 | + '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
3131 | + '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
3132 | + '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
3133 | + '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
3134 | 3134 | ), |
3135 | 3135 | ); |
3136 | 3136 | |
@@ -3390,7 +3390,7 @@ discard block |
||
3390 | 3390 | // This bit fixes incorrect string lengths, which can happen if the character encoding was changed (e.g. conversion to UTF-8) |
3391 | 3391 | $new_string = preg_replace_callback( |
3392 | 3392 | '~\bs:(\d+):"(.*?)";(?=$|[bidsaO]:|[{}}]|N;)~s', |
3393 | - function ($matches) |
|
3393 | + function($matches) |
|
3394 | 3394 | { |
3395 | 3395 | return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";'; |
3396 | 3396 | }, |
@@ -41,7 +41,8 @@ discard block |
||
41 | 41 | 'mysql' => array( |
42 | 42 | 'name' => 'MySQL', |
43 | 43 | 'version' => '5.6.0', |
44 | - 'version_check' => function() { |
|
44 | + 'version_check' => function() |
|
45 | + { |
|
45 | 46 | global $db_connection; |
46 | 47 | if (!function_exists('mysqli_fetch_row')) |
47 | 48 | return false; |
@@ -52,7 +53,8 @@ discard block |
||
52 | 53 | 'postgresql' => array( |
53 | 54 | 'name' => 'PostgreSQL', |
54 | 55 | 'version' => '9.6', |
55 | - 'version_check' => function() { |
|
56 | + 'version_check' => function() |
|
57 | + { |
|
56 | 58 | if (!function_exists('pg_version')) |
57 | 59 | return false; |
58 | 60 | $version = pg_version(); |
@@ -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; |
@@ -1107,7 +1107,7 @@ |
||
1107 | 1107 | 'left_join' => array(), |
1108 | 1108 | 'where' => array( |
1109 | 1109 | 't.id_redirect_topic = {int:not_redirected}', |
1110 | - 't.redirect_expires = {int:never_expires}', |
|
1110 | + 't.redirect_expires = {int:never_expires}', |
|
1111 | 1111 | ), |
1112 | 1112 | ); |
1113 | 1113 |
@@ -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()) |
@@ -2214,7 +2214,6 @@ |
||
2214 | 2214 | $hookData['pureFunc'] = $hookData['method']; |
2215 | 2215 | $hookData['call'] = $modFunc; |
2216 | 2216 | } |
2217 | - |
|
2218 | 2217 | else |
2219 | 2218 | $hookData['call'] = $hookData['pureFunc'] = $modFunc; |
2220 | 2219 |
@@ -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 | }, |