@@ -41,7 +41,7 @@ |
||
| 41 | 41 | { |
| 42 | 42 | if (class_exists('Imagick')) |
| 43 | 43 | { |
| 44 | - $temp = New Imagick; |
|
| 44 | + $temp = new Imagick; |
|
| 45 | 45 | $temp2 = $temp->getVersion(); |
| 46 | 46 | $im_version = $temp2['versionString']; |
| 47 | 47 | $extension_version = 'Imagick ' . phpversion('Imagick'); |
@@ -1736,7 +1736,7 @@ discard block |
||
| 1736 | 1736 | // Prevents warnings about constants that are already defined. |
| 1737 | 1737 | $settingsText = preg_replace_callback( |
| 1738 | 1738 | '~\bdefine\s*\(\s*(["\'])(\w+)\1~', |
| 1739 | - function ($matches) |
|
| 1739 | + function($matches) |
|
| 1740 | 1740 | { |
| 1741 | 1741 | return 'define(\'' . md5(mt_rand()) . '\''; |
| 1742 | 1742 | }, |
@@ -1746,7 +1746,7 @@ discard block |
||
| 1746 | 1746 | // Handle eval errors gracefully in both PHP 5 and PHP 7 |
| 1747 | 1747 | try |
| 1748 | 1748 | { |
| 1749 | - if($settingsText !== '' && @eval($settingsText) === false) |
|
| 1749 | + if ($settingsText !== '' && @eval($settingsText) === false) |
|
| 1750 | 1750 | throw new ErrorException('eval error'); |
| 1751 | 1751 | |
| 1752 | 1752 | unset($mtime, $settingsFile, $settingsText); |
@@ -1953,7 +1953,7 @@ discard block |
||
| 1953 | 1953 | } |
| 1954 | 1954 | |
| 1955 | 1955 | // Everything is simpler if we convert heredocs to normal strings first. |
| 1956 | - if (preg_match_all('/<<<(\'?)(\w+)\'?'. $line_ending . '(.*?)'. $line_ending . '\2;$/m', $code_str, $matches)) |
|
| 1956 | + if (preg_match_all('/<<<(\'?)(\w+)\'?' . $line_ending . '(.*?)' . $line_ending . '\2;$/m', $code_str, $matches)) |
|
| 1957 | 1957 | { |
| 1958 | 1958 | foreach ($matches[0] as $mkey => $heredoc) |
| 1959 | 1959 | { |
@@ -1967,7 +1967,7 @@ discard block |
||
| 1967 | 1967 | } |
| 1968 | 1968 | |
| 1969 | 1969 | // Split before everything that could possibly delimit a comment or a string. |
| 1970 | - $parts = preg_split('~(?=#+|/(?=/|\*)|\*/|'. $line_ending . '|(?<!\\\)[\'"])~m', $code_str); |
|
| 1970 | + $parts = preg_split('~(?=#+|/(?=/|\*)|\*/|' . $line_ending . '|(?<!\\\)[\'"])~m', $code_str); |
|
| 1971 | 1971 | |
| 1972 | 1972 | $in_string = 0; |
| 1973 | 1973 | $in_comment = 0; |
@@ -1213,7 +1213,8 @@ discard block |
||
| 1213 | 1213 | } |
| 1214 | 1214 | |
| 1215 | 1215 | // It's important to do the numbered ones before the named ones, or messes happen. |
| 1216 | - uksort($substitutions, function($a, $b) { |
|
| 1216 | + uksort($substitutions, function($a, $b) |
|
| 1217 | + { |
|
| 1217 | 1218 | if (is_int($a) && is_int($b)) |
| 1218 | 1219 | return $a > $b; |
| 1219 | 1220 | elseif (is_int($a)) |
@@ -1752,8 +1753,12 @@ discard block |
||
| 1752 | 1753 | unset($mtime, $settingsFile, $settingsText); |
| 1753 | 1754 | $defined_vars = get_defined_vars(); |
| 1754 | 1755 | } |
| 1755 | - catch (Throwable $e) {} |
|
| 1756 | - catch (ErrorException $e) {} |
|
| 1756 | + catch (Throwable $e) |
|
| 1757 | + { |
|
| 1758 | +} |
|
| 1759 | + catch (ErrorException $e) |
|
| 1760 | + { |
|
| 1761 | +} |
|
| 1757 | 1762 | if (isset($e)) |
| 1758 | 1763 | return false; |
| 1759 | 1764 | |
@@ -1913,7 +1918,8 @@ discard block |
||
| 1913 | 1918 | // For the same reason, replace literal returns and newlines with "\r" and "\n" |
| 1914 | 1919 | elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false)) |
| 1915 | 1920 | { |
| 1916 | - return strtr(preg_replace_callback('/[\r\n]+/', function($m) { |
|
| 1921 | + return strtr(preg_replace_callback('/[\r\n]+/', function($m) |
|
| 1922 | + { |
|
| 1917 | 1923 | return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \''; |
| 1918 | 1924 | }, $var), array("'' . " => '', " . ''" => '')); |
| 1919 | 1925 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | // Set a list of common functions. |
| 99 | 99 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
| 100 | 100 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
| 101 | - { |
|
| 101 | + { |
|
| 102 | 102 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
| 103 | 103 | return $string; |
| 104 | 104 | } : function($string) |
@@ -2147,7 +2147,6 @@ discard block |
||
| 2147 | 2147 | loadLanguage('index+Modifications'); |
| 2148 | 2148 | $context['template_layers'] = array(); |
| 2149 | 2149 | } |
| 2150 | - |
|
| 2151 | 2150 | else |
| 2152 | 2151 | { |
| 2153 | 2152 | // Custom templates to load, or just default? |
@@ -2525,14 +2524,12 @@ discard block |
||
| 2525 | 2524 | $fileUrl = $settings['default_theme_url'] . '/css/' . $fileName; |
| 2526 | 2525 | $filePath = $settings['default_theme_dir'] . '/css/' . $fileName; |
| 2527 | 2526 | } |
| 2528 | - |
|
| 2529 | 2527 | else |
| 2530 | 2528 | { |
| 2531 | 2529 | $fileUrl = false; |
| 2532 | 2530 | $filePath = false; |
| 2533 | 2531 | } |
| 2534 | 2532 | } |
| 2535 | - |
|
| 2536 | 2533 | else |
| 2537 | 2534 | { |
| 2538 | 2535 | $fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName; |
@@ -2639,14 +2636,12 @@ discard block |
||
| 2639 | 2636 | $fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName; |
| 2640 | 2637 | $filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName; |
| 2641 | 2638 | } |
| 2642 | - |
|
| 2643 | 2639 | else |
| 2644 | 2640 | { |
| 2645 | 2641 | $fileUrl = false; |
| 2646 | 2642 | $filePath = false; |
| 2647 | 2643 | } |
| 2648 | 2644 | } |
| 2649 | - |
|
| 2650 | 2645 | else |
| 2651 | 2646 | { |
| 2652 | 2647 | $fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName; |
@@ -372,7 +372,7 @@ |
||
| 372 | 372 | // And a bit more for database changes. |
| 373 | 373 | if ($context['uninstalling'] && !empty($context['database_changes'])) |
| 374 | 374 | echo ' |
| 375 | - makeToggle(document.getElementById(\'db_changes_div\'), ', JavaScriptEscape($txt['package_db_uninstall_details']) , ');'; |
|
| 375 | + makeToggle(document.getElementById(\'db_changes_div\'), ', JavaScriptEscape($txt['package_db_uninstall_details']), ');'; |
|
| 376 | 376 | |
| 377 | 377 | echo ' |
| 378 | 378 | </script>'; |
@@ -7116,32 +7116,32 @@ discard block |
||
| 7116 | 7116 | */ |
| 7117 | 7117 | function truncate_array($array, $max_length = 1900, $deep = 3) |
| 7118 | 7118 | { |
| 7119 | - $array = (array) $array; |
|
| 7119 | + $array = (array) $array; |
|
| 7120 | 7120 | |
| 7121 | - $curr_length = array_length($array, $deep); |
|
| 7121 | + $curr_length = array_length($array, $deep); |
|
| 7122 | 7122 | |
| 7123 | - if ($curr_length <= $max_length) |
|
| 7124 | - return $array; |
|
| 7123 | + if ($curr_length <= $max_length) |
|
| 7124 | + return $array; |
|
| 7125 | 7125 | |
| 7126 | - else |
|
| 7127 | - { |
|
| 7128 | - // Truncate each element's value to a reasonable length |
|
| 7129 | - $param_max = floor($max_length / count($array)); |
|
| 7126 | + else |
|
| 7127 | + { |
|
| 7128 | + // Truncate each element's value to a reasonable length |
|
| 7129 | + $param_max = floor($max_length / count($array)); |
|
| 7130 | 7130 | |
| 7131 | - $current_deep = $deep - 1; |
|
| 7131 | + $current_deep = $deep - 1; |
|
| 7132 | 7132 | |
| 7133 | - foreach ($array as $key => &$value) |
|
| 7134 | - { |
|
| 7135 | - if (is_array($value)) |
|
| 7136 | - if ($current_deep > 0) |
|
| 7137 | - $value = truncate_array($value, $current_deep); |
|
| 7133 | + foreach ($array as $key => &$value) |
|
| 7134 | + { |
|
| 7135 | + if (is_array($value)) |
|
| 7136 | + if ($current_deep > 0) |
|
| 7137 | + $value = truncate_array($value, $current_deep); |
|
| 7138 | 7138 | |
| 7139 | - else |
|
| 7140 | - $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7141 | - } |
|
| 7139 | + else |
|
| 7140 | + $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7141 | + } |
|
| 7142 | 7142 | |
| 7143 | - return $array; |
|
| 7144 | - } |
|
| 7143 | + return $array; |
|
| 7144 | + } |
|
| 7145 | 7145 | } |
| 7146 | 7146 | |
| 7147 | 7147 | /** |
@@ -7152,29 +7152,29 @@ discard block |
||
| 7152 | 7152 | */ |
| 7153 | 7153 | function array_length($array, $deep = 3) |
| 7154 | 7154 | { |
| 7155 | - // Work with arrays |
|
| 7156 | - $array = (array) $array; |
|
| 7157 | - $length = 0; |
|
| 7155 | + // Work with arrays |
|
| 7156 | + $array = (array) $array; |
|
| 7157 | + $length = 0; |
|
| 7158 | 7158 | |
| 7159 | - $deep_count = $deep - 1; |
|
| 7159 | + $deep_count = $deep - 1; |
|
| 7160 | 7160 | |
| 7161 | - foreach ($array as $value) |
|
| 7162 | - { |
|
| 7163 | - // Recursive? |
|
| 7164 | - if (is_array($value)) |
|
| 7165 | - { |
|
| 7166 | - // No can't do |
|
| 7167 | - if ($deep_count <= 0) |
|
| 7168 | - continue; |
|
| 7161 | + foreach ($array as $value) |
|
| 7162 | + { |
|
| 7163 | + // Recursive? |
|
| 7164 | + if (is_array($value)) |
|
| 7165 | + { |
|
| 7166 | + // No can't do |
|
| 7167 | + if ($deep_count <= 0) |
|
| 7168 | + continue; |
|
| 7169 | 7169 | |
| 7170 | - $length += array_length($value, $deep_count); |
|
| 7171 | - } |
|
| 7170 | + $length += array_length($value, $deep_count); |
|
| 7171 | + } |
|
| 7172 | 7172 | |
| 7173 | - else |
|
| 7174 | - $length += strlen($value); |
|
| 7175 | - } |
|
| 7173 | + else |
|
| 7174 | + $length += strlen($value); |
|
| 7175 | + } |
|
| 7176 | 7176 | |
| 7177 | - return $length; |
|
| 7177 | + return $length; |
|
| 7178 | 7178 | } |
| 7179 | 7179 | |
| 7180 | 7180 | ?> |
| 7181 | 7181 | \ No newline at end of file |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | { |
| 378 | 378 | $val = 'CASE '; |
| 379 | 379 | foreach ($members as $k => $v) |
| 380 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
| 380 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
| 381 | 381 | |
| 382 | 382 | $val = $val . ' END'; |
| 383 | 383 | $type = 'raw'; |
@@ -1041,11 +1041,11 @@ discard block |
||
| 1041 | 1041 | // Anything that isn't a specification, punctuation mark, or whitespace. |
| 1042 | 1042 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
| 1043 | 1043 | // A series of punctuation marks (except %), possibly separated by whitespace. |
| 1044 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
| 1044 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
| 1045 | 1045 | // Unwanted trailing punctuation and whitespace. |
| 1046 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
| 1046 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
| 1047 | 1047 | // Unwanted opening punctuation and whitespace. |
| 1048 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
| 1048 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
| 1049 | 1049 | ), |
| 1050 | 1050 | array( |
| 1051 | 1051 | '', |
@@ -1452,7 +1452,7 @@ discard block |
||
| 1452 | 1452 | $width = !empty($width) ? ' width="' . $width . '"' : ''; |
| 1453 | 1453 | $height = !empty($height) ? ' height="' . $height . '"' : ''; |
| 1454 | 1454 | |
| 1455 | - $returnContext .= '<div class="videocontainer"><div><video controls preload="none" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . ' style="object-fit:contain;"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
| 1455 | + $returnContext .= '<div class="videocontainer"><div><video controls preload="none" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . ' style="object-fit:contain;"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
| 1456 | 1456 | } |
| 1457 | 1457 | // Audio. |
| 1458 | 1458 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1460,7 +1460,7 @@ discard block |
||
| 1460 | 1460 | $width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
| 1461 | 1461 | $height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
| 1462 | 1462 | |
| 1463 | - $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>'; |
|
| 1463 | + $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>'; |
|
| 1464 | 1464 | } |
| 1465 | 1465 | // Anything else. |
| 1466 | 1466 | else |
@@ -1623,7 +1623,7 @@ discard block |
||
| 1623 | 1623 | 'type' => 'unparsed_commas_content', |
| 1624 | 1624 | 'test' => '\d+,\d+\]', |
| 1625 | 1625 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
| 1626 | - 'validate' => function (&$tag, &$data, $disabled) |
|
| 1626 | + 'validate' => function(&$tag, &$data, $disabled) |
|
| 1627 | 1627 | { |
| 1628 | 1628 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
| 1629 | 1629 | if (empty($scheme)) |
@@ -2161,7 +2161,7 @@ discard block |
||
| 2161 | 2161 | $codes[] = array( |
| 2162 | 2162 | 'tag' => 'cowsay', |
| 2163 | 2163 | 'parameters' => array( |
| 2164 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
| 2164 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
| 2165 | 2165 | { |
| 2166 | 2166 | static $css_added; |
| 2167 | 2167 | |
@@ -2178,7 +2178,7 @@ discard block |
||
| 2178 | 2178 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
| 2179 | 2179 | }, |
| 2180 | 2180 | ), |
| 2181 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
| 2181 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
| 2182 | 2182 | { |
| 2183 | 2183 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2184 | 2184 | }, |
@@ -3550,7 +3550,7 @@ discard block |
||
| 3550 | 3550 | if ($fp != false) |
| 3551 | 3551 | { |
| 3552 | 3552 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
| 3553 | - 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"); |
|
| 3553 | + 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"); |
|
| 3554 | 3554 | |
| 3555 | 3555 | // Read in the HTTP/1.1 or whatever. |
| 3556 | 3556 | $test = substr(fgets($fp, 11), -1); |
@@ -4151,7 +4151,7 @@ discard block |
||
| 4151 | 4151 | $toMinify = array(); |
| 4152 | 4152 | $normal = array(); |
| 4153 | 4153 | |
| 4154 | - usort($context['css_files'], function ($a, $b) |
|
| 4154 | + usort($context['css_files'], function($a, $b) |
|
| 4155 | 4155 | { |
| 4156 | 4156 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
| 4157 | 4157 | }); |
@@ -5443,7 +5443,7 @@ discard block |
||
| 5443 | 5443 | { |
| 5444 | 5444 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
| 5445 | 5445 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
| 5446 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
| 5446 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
| 5447 | 5447 | if ($keep_alive) |
| 5448 | 5448 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
| 5449 | 5449 | else |
@@ -5453,7 +5453,7 @@ discard block |
||
| 5453 | 5453 | { |
| 5454 | 5454 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
| 5455 | 5455 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
| 5456 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
| 5456 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
| 5457 | 5457 | if ($keep_alive) |
| 5458 | 5458 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
| 5459 | 5459 | else |
@@ -5609,13 +5609,13 @@ discard block |
||
| 5609 | 5609 | |
| 5610 | 5610 | // UTF-8 occurences of MS special characters |
| 5611 | 5611 | $findchars_utf8 = array( |
| 5612 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
| 5613 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
| 5614 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
| 5615 | - "\xe2\x80\x98", // left single curly quote |
|
| 5616 | - "\xe2\x80\x99", // right single curly quote |
|
| 5617 | - "\xe2\x80\x9c", // left double curly quote |
|
| 5618 | - "\xe2\x80\x9d", // right double curly quote |
|
| 5612 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
| 5613 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
| 5614 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
| 5615 | + "\xe2\x80\x98", // left single curly quote |
|
| 5616 | + "\xe2\x80\x99", // right single curly quote |
|
| 5617 | + "\xe2\x80\x9c", // left double curly quote |
|
| 5618 | + "\xe2\x80\x9d", // right double curly quote |
|
| 5619 | 5619 | ); |
| 5620 | 5620 | |
| 5621 | 5621 | // windows 1252 / iso equivalents |
@@ -5631,13 +5631,13 @@ discard block |
||
| 5631 | 5631 | |
| 5632 | 5632 | // safe replacements |
| 5633 | 5633 | $replacechars = array( |
| 5634 | - ',', // ‚ |
|
| 5635 | - ',,', // „ |
|
| 5636 | - '...', // … |
|
| 5637 | - "'", // ‘ |
|
| 5638 | - "'", // ’ |
|
| 5639 | - '"', // “ |
|
| 5640 | - '"', // ” |
|
| 5634 | + ',', // ‚ |
|
| 5635 | + ',,', // „ |
|
| 5636 | + '...', // … |
|
| 5637 | + "'", // ‘ |
|
| 5638 | + "'", // ’ |
|
| 5639 | + '"', // “ |
|
| 5640 | + '"', // ” |
|
| 5641 | 5641 | ); |
| 5642 | 5642 | |
| 5643 | 5643 | if ($context['utf8']) |
@@ -6818,7 +6818,7 @@ discard block |
||
| 6818 | 6818 | EXISTS ( |
| 6819 | 6819 | SELECT bpv.id_board |
| 6820 | 6820 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
| 6821 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
| 6821 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
| 6822 | 6822 | AND bpv.deny = 0 |
| 6823 | 6823 | AND bpv.id_board = b.id_board |
| 6824 | 6824 | )'; |
@@ -6828,7 +6828,7 @@ discard block |
||
| 6828 | 6828 | AND NOT EXISTS ( |
| 6829 | 6829 | SELECT bpv.id_board |
| 6830 | 6830 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
| 6831 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
| 6831 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
| 6832 | 6832 | AND bpv.deny = 1 |
| 6833 | 6833 | AND bpv.id_board = b.id_board |
| 6834 | 6834 | )'; |
@@ -7099,8 +7099,8 @@ discard block |
||
| 7099 | 7099 | $i = 0; |
| 7100 | 7100 | while (empty($done)) |
| 7101 | 7101 | { |
| 7102 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
| 7103 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
| 7102 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
| 7103 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
| 7104 | 7104 | else |
| 7105 | 7105 | $done = true; |
| 7106 | 7106 | } |
@@ -7110,8 +7110,8 @@ discard block |
||
| 7110 | 7110 | $i = 0; |
| 7111 | 7111 | while (empty($done)) |
| 7112 | 7112 | { |
| 7113 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
| 7114 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
| 7113 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
| 7114 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
| 7115 | 7115 | else |
| 7116 | 7116 | $done = true; |
| 7117 | 7117 | } |
@@ -279,7 +279,6 @@ discard block |
||
| 279 | 279 | $condition = 'id_member IN ({array_int:members})'; |
| 280 | 280 | $parameters['members'] = $members; |
| 281 | 281 | } |
| 282 | - |
|
| 283 | 282 | elseif ($members === null) |
| 284 | 283 | $condition = '1=1'; |
| 285 | 284 | |
@@ -382,11 +381,9 @@ discard block |
||
| 382 | 381 | $val = $val . ' END'; |
| 383 | 382 | $type = 'raw'; |
| 384 | 383 | } |
| 385 | - |
|
| 386 | 384 | else |
| 387 | 385 | $val = alert_count($members, true); |
| 388 | 386 | } |
| 389 | - |
|
| 390 | 387 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
| 391 | 388 | { |
| 392 | 389 | $val = $var . ' ' . $val . ' 1'; |
@@ -2162,7 +2159,7 @@ discard block |
||
| 2162 | 2159 | 'tag' => 'cowsay', |
| 2163 | 2160 | 'parameters' => array( |
| 2164 | 2161 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
| 2165 | - { |
|
| 2162 | + { |
|
| 2166 | 2163 | static $css_added; |
| 2167 | 2164 | |
| 2168 | 2165 | if (empty($css_added)) |
@@ -2179,7 +2176,7 @@ discard block |
||
| 2179 | 2176 | }, |
| 2180 | 2177 | ), |
| 2181 | 2178 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
| 2182 | - { |
|
| 2179 | + { |
|
| 2183 | 2180 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2184 | 2181 | }, |
| 2185 | 2182 | ), |
@@ -3277,7 +3274,7 @@ discard block |
||
| 3277 | 3274 | |
| 3278 | 3275 | // Replace away! |
| 3279 | 3276 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
| 3280 | - { |
|
| 3277 | + { |
|
| 3281 | 3278 | return $smileyPregReplacements[$matches[1]]; |
| 3282 | 3279 | }, $message); |
| 3283 | 3280 | } |
@@ -4073,7 +4070,6 @@ discard block |
||
| 4073 | 4070 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
| 4074 | 4071 | $minSeed = $js_file['options']['seed']; |
| 4075 | 4072 | } |
| 4076 | - |
|
| 4077 | 4073 | else |
| 4078 | 4074 | { |
| 4079 | 4075 | echo ' |
@@ -6255,7 +6251,6 @@ discard block |
||
| 6255 | 6251 | $isWritable = true; |
| 6256 | 6252 | break; |
| 6257 | 6253 | } |
| 6258 | - |
|
| 6259 | 6254 | else |
| 6260 | 6255 | @chmod($file, $val); |
| 6261 | 6256 | } |
@@ -7187,7 +7182,6 @@ discard block |
||
| 7187 | 7182 | |
| 7188 | 7183 | $length += array_length($value, $deep_count); |
| 7189 | 7184 | } |
| 7190 | - |
|
| 7191 | 7185 | else |
| 7192 | 7186 | $length += strlen($value); |
| 7193 | 7187 | } |
@@ -1155,7 +1155,7 @@ |
||
| 1155 | 1155 | // We're really just checking for entries which are create table AND add columns (etc). |
| 1156 | 1156 | $tables = array(); |
| 1157 | 1157 | |
| 1158 | - usort($db_package_log, function ($a, $b) |
|
| 1158 | + usort($db_package_log, function($a, $b) |
|
| 1159 | 1159 | { |
| 1160 | 1160 | if ($a[0] == $b[0]) |
| 1161 | 1161 | return 0; |
@@ -964,7 +964,7 @@ |
||
| 964 | 964 | $incontext['continue'] = 1; |
| 965 | 965 | |
| 966 | 966 | // Check Postgres setting |
| 967 | - if ( $db_type === 'postgresql') |
|
| 967 | + if ($db_type === 'postgresql') |
|
| 968 | 968 | { |
| 969 | 969 | load_database(); |
| 970 | 970 | $result = $smcFunc['db_query']('', ' |
@@ -978,7 +978,7 @@ |
||
| 978 | 978 | { |
| 979 | 979 | $row = $smcFunc['db_fetch_assoc']($result); |
| 980 | 980 | if ($row['standard_conforming_strings'] !== 'on') |
| 981 | - { |
|
| 981 | + { |
|
| 982 | 982 | $incontext['continue'] = 0; |
| 983 | 983 | $incontext['error'] = $txt['error_pg_scs']; |
| 984 | 984 | } |
@@ -1259,7 +1259,7 @@ |
||
| 1259 | 1259 | // File Upload. |
| 1260 | 1260 | if ($context['can_post_attachment']) |
| 1261 | 1261 | { |
| 1262 | - $acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(function ($val) use ($smcFunc) |
|
| 1262 | + $acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(function($val) use ($smcFunc) |
|
| 1263 | 1263 | { |
| 1264 | 1264 | return !empty($val) ? ('.' . $smcFunc['htmltrim']($val)) : ''; |
| 1265 | 1265 | }, explode(',', $context['allowed_extensions']))); |