@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | 'if (!is_dir(realpath($cachedir)) && is_dir($boarddir . \'/cache\'))', |
860 | 860 | ' $cachedir = $boarddir . \'/cache\';', |
861 | 861 | )), |
862 | - 'search_pattern' => '~\n?(#[^\n]+)?(?:\n\h*if\s*\((?:\!file_exists\(\$(?'.'>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)|\!is_dir\(realpath\(\$(?'.'>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)\))[^;]+\n\h*\$(?'.'>boarddir|sourcedir|tasksdir|packagesdir|cachedir)[^\n]+;)+~sm', |
|
862 | + 'search_pattern' => '~\n?(#[^\n]+)?(?:\n\h*if\s*\((?:\!file_exists\(\$(?' . '>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)|\!is_dir\(realpath\(\$(?' . '>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)\))[^;]+\n\h*\$(?' . '>boarddir|sourcedir|tasksdir|packagesdir|cachedir)[^\n]+;)+~sm', |
|
863 | 863 | ), |
864 | 864 | 'db_character_set' => array( |
865 | 865 | 'text' => implode("\n", array( |
@@ -958,8 +958,8 @@ discard block |
||
958 | 958 | 'boolean' => '(?i:TRUE|FALSE|(["\']?)[01]\b\\1)', |
959 | 959 | 'NULL' => '(?i:NULL)', |
960 | 960 | // These use a PCRE subroutine to match nested arrays. |
961 | - 'array' => 'array\s*(\((?'.'>[^()]|(?1))*\))', |
|
962 | - 'object' => '\w+::__set_state\(array\s*(\((?'.'>[^()]|(?1))*\))\)', |
|
961 | + 'array' => 'array\s*(\((?' . '>[^()]|(?1))*\))', |
|
962 | + 'object' => '\w+::__set_state\(array\s*(\((?' . '>[^()]|(?1))*\))\)', |
|
963 | 963 | ); |
964 | 964 | |
965 | 965 | /* |
@@ -992,7 +992,7 @@ discard block |
||
992 | 992 | ), |
993 | 993 | // Remove the code that redirects to the installer. |
994 | 994 | $neg_index-- => array( |
995 | - 'search_pattern' => '~^if\s*\(file_exists\(dirname\(__FILE__\)\s*\.\s*\'/install\.php\'\)\)\s*(?:({(?'.'>[^{}]|(?1))*})\h*|header(\((?' . '>[^()]|(?2))*\));\n)~m', |
|
995 | + 'search_pattern' => '~^if\s*\(file_exists\(dirname\(__FILE__\)\s*\.\s*\'/install\.php\'\)\)\s*(?:({(?' . '>[^{}]|(?1))*})\h*|header(\((?' . '>[^()]|(?2))*\));\n)~m', |
|
996 | 996 | 'placeholder' => '', |
997 | 997 | ), |
998 | 998 | ); |
@@ -1758,7 +1758,7 @@ discard block |
||
1758 | 1758 | // Prevents warnings about constants that are already defined. |
1759 | 1759 | $settingsText = preg_replace_callback( |
1760 | 1760 | '~\bdefine\s*\(\s*(["\'])(\w+)\1~', |
1761 | - function ($matches) |
|
1761 | + function($matches) |
|
1762 | 1762 | { |
1763 | 1763 | return 'define(\'' . md5(mt_rand()) . '\''; |
1764 | 1764 | }, |
@@ -1768,7 +1768,7 @@ discard block |
||
1768 | 1768 | // Handle eval errors gracefully in both PHP 5 and PHP 7 |
1769 | 1769 | try |
1770 | 1770 | { |
1771 | - if($settingsText !== '' && @eval($settingsText) === false) |
|
1771 | + if ($settingsText !== '' && @eval($settingsText) === false) |
|
1772 | 1772 | throw new ErrorException('eval error'); |
1773 | 1773 | |
1774 | 1774 | unset($mtime, $settingsFile, $settingsText); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | // Figure out the filename we'll tell the browser. |
470 | 470 | $datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile'); |
471 | 471 | $included_desc = array_map( |
472 | - function ($datatype) use ($txt) |
|
472 | + function($datatype) use ($txt) |
|
473 | 473 | { |
474 | 474 | return $txt[$datatype]; |
475 | 475 | }, |
@@ -789,9 +789,9 @@ discard block |
||
789 | 789 | $xslt_variables = array(); |
790 | 790 | |
791 | 791 | // Do not change any of these to HTTPS URLs. For explanation, see comments in the buildXmlFeed() function. |
792 | - $smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/profile'; |
|
793 | - $xslt_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/XSL/Transform'; |
|
794 | - $html_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/xhtml'; |
|
792 | + $smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/profile'; |
|
793 | + $xslt_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/XSL/Transform'; |
|
794 | + $html_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/xhtml'; |
|
795 | 795 | |
796 | 796 | require_once($sourcedir . DIRECTORY_SEPARATOR . 'News.php'); |
797 | 797 | |
@@ -1696,14 +1696,14 @@ discard block |
||
1696 | 1696 | |
1697 | 1697 | if (!empty($context['export_css_header'])) |
1698 | 1698 | { |
1699 | - $stylesheet['css_js'] .= ' |
|
1699 | + $stylesheet['css_js'] .= ' |
|
1700 | 1700 | <style><![CDATA[' . "\n" . implode("\n", $context['export_css_header']) . "\n" . ']]> |
1701 | 1701 | </style>'; |
1702 | 1702 | } |
1703 | 1703 | |
1704 | 1704 | if (!empty($context['export_javascript_vars'])) |
1705 | 1705 | { |
1706 | - $stylesheet['css_js'] .= ' |
|
1706 | + $stylesheet['css_js'] .= ' |
|
1707 | 1707 | <script><![CDATA['; |
1708 | 1708 | |
1709 | 1709 | foreach ($context['export_javascript_vars'] as $var => $val) |
@@ -1739,7 +1739,7 @@ discard block |
||
1739 | 1739 | |
1740 | 1740 | if (!empty($context['export_javascript_inline']['standard'])) |
1741 | 1741 | { |
1742 | - $stylesheet['css_js'] .= ' |
|
1742 | + $stylesheet['css_js'] .= ' |
|
1743 | 1743 | <script><![CDATA[' . "\n" . implode("\n", $context['export_javascript_inline']['standard']) . "\n" . ']]> |
1744 | 1744 | </script>'; |
1745 | 1745 | } |
@@ -1751,7 +1751,7 @@ discard block |
||
1751 | 1751 | |
1752 | 1752 | $stylesheet['css_js'] .= "\n\t" . str_replace("\n", "\n\t", implode("\n", $context['export_javascript_inline']['defer'])); |
1753 | 1753 | |
1754 | - $stylesheet['css_js'] .= "\n" . '});'. "\n" . ']]> |
|
1754 | + $stylesheet['css_js'] .= "\n" . '});' . "\n" . ']]> |
|
1755 | 1755 | </script>'; |
1756 | 1756 | } |
1757 | 1757 | |
@@ -1834,7 +1834,7 @@ discard block |
||
1834 | 1834 | |
1835 | 1835 | usort( |
1836 | 1836 | $context['css_files'], |
1837 | - function ($a, $b) |
|
1837 | + function($a, $b) |
|
1838 | 1838 | { |
1839 | 1839 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
1840 | 1840 | } |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | $to = explode('/', $lang_dir); |
547 | 547 | $relPath = $to; |
548 | 548 | |
549 | - foreach($from as $depth => $dir) |
|
549 | + foreach ($from as $depth => $dir) |
|
550 | 550 | { |
551 | 551 | if ($dir === $to[$depth]) |
552 | 552 | array_shift($relPath); |
@@ -3067,94 +3067,94 @@ discard block |
||
3067 | 3067 | // Translation table for the character sets not native for MySQL. |
3068 | 3068 | $translation_tables = array( |
3069 | 3069 | 'windows-1255' => array( |
3070 | - '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
3071 | - '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
3072 | - '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
3073 | - '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
3074 | - '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
3075 | - '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
3076 | - '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
3077 | - '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
3078 | - '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
3079 | - '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
3080 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3081 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3082 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3083 | - '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
3084 | - '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
3085 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3086 | - '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
3087 | - '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
3088 | - '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
3089 | - '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
3090 | - '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
3091 | - '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
3092 | - '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
3093 | - '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
3094 | - '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
3095 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3096 | - '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
3097 | - '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3098 | - '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
3099 | - '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
3100 | - '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
3101 | - '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
3102 | - '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
3103 | - '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
3104 | - '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
3105 | - '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
3106 | - '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
3107 | - '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
3108 | - '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
3109 | - '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
3110 | - '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
3111 | - '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
3070 | + '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
3071 | + '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
3072 | + '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
3073 | + '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
3074 | + '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
3075 | + '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
3076 | + '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
3077 | + '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
3078 | + '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
3079 | + '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
3080 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3081 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3082 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3083 | + '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
3084 | + '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
3085 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3086 | + '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
3087 | + '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
3088 | + '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
3089 | + '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
3090 | + '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
3091 | + '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
3092 | + '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
3093 | + '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
3094 | + '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
3095 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3096 | + '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
3097 | + '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3098 | + '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
3099 | + '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
3100 | + '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
3101 | + '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
3102 | + '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
3103 | + '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
3104 | + '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
3105 | + '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
3106 | + '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
3107 | + '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
3108 | + '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
3109 | + '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
3110 | + '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
3111 | + '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
3112 | 3112 | '0xFA' => '0xD7AA', |
3113 | 3113 | ), |
3114 | 3114 | 'windows-1253' => array( |
3115 | - '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
3116 | - '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
3117 | - '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
3118 | - '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
3119 | - '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
3120 | - '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
3121 | - '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
3122 | - '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
3123 | - '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
3124 | - '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
3125 | - '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
3126 | - '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
3127 | - '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
3128 | - '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
3129 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3130 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3131 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3132 | - '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
3133 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3134 | - '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
3135 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3136 | - '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
3137 | - '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
3138 | - '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
3139 | - '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3140 | - '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
3141 | - '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
3142 | - '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
3143 | - '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
3144 | - '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
3145 | - '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
3146 | - '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
3147 | - '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
3148 | - '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
3149 | - '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
3150 | - '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
3151 | - '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
3152 | - '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
3153 | - '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
3154 | - '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
3155 | - '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
3156 | - '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
3157 | - '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
3115 | + '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
3116 | + '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
3117 | + '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
3118 | + '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
3119 | + '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
3120 | + '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
3121 | + '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
3122 | + '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
3123 | + '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
3124 | + '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
3125 | + '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
3126 | + '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
3127 | + '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
3128 | + '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
3129 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3130 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3131 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3132 | + '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
3133 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3134 | + '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
3135 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3136 | + '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
3137 | + '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
3138 | + '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
3139 | + '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3140 | + '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
3141 | + '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
3142 | + '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
3143 | + '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
3144 | + '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
3145 | + '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
3146 | + '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
3147 | + '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
3148 | + '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
3149 | + '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
3150 | + '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
3151 | + '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
3152 | + '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
3153 | + '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
3154 | + '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
3155 | + '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
3156 | + '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
3157 | + '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
3158 | 3158 | ), |
3159 | 3159 | ); |
3160 | 3160 | |
@@ -3414,7 +3414,7 @@ discard block |
||
3414 | 3414 | // This bit fixes incorrect string lengths, which can happen if the character encoding was changed (e.g. conversion to UTF-8) |
3415 | 3415 | $new_string = preg_replace_callback( |
3416 | 3416 | '~\bs:(\d+):"(.*?)";(?=$|[bidsaO]:|[{}}]|N;)~s', |
3417 | - function ($matches) |
|
3417 | + function($matches) |
|
3418 | 3418 | { |
3419 | 3419 | return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";'; |
3420 | 3420 | }, |
@@ -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; |
@@ -315,7 +315,7 @@ |
||
315 | 315 | |
316 | 316 | array_walk_recursive( |
317 | 317 | $_POST, |
318 | - function (&$value, $key) use ($context, $smcFunc) |
|
318 | + function(&$value, $key) use ($context, $smcFunc) |
|
319 | 319 | { |
320 | 320 | // Normalize Unicode characters. (Does nothing if not in UTF-8 mode.) |
321 | 321 | $value = $smcFunc['normalize']($value); |
@@ -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()) |
@@ -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(); |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $combining_classes = utf8_combining_classes(); |
266 | 266 | |
267 | 267 | // Replace characters with decomposed forms. |
268 | - for ($i=0; $i < count($chars); $i++) |
|
268 | + for ($i = 0; $i < count($chars); $i++) |
|
269 | 269 | { |
270 | 270 | // Hangul characters. |
271 | 271 | if ($chars[$i] >= "\xEA\xB0\x80" && $chars[$i] <= "\xED\x9E\xA3") |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | { |
300 | 300 | $temp = $chars[$i]; |
301 | 301 | $chars[$i] = $chars[$i - 1]; |
302 | - $chars[$i -1] = $temp; |
|
302 | + $chars[$i - 1] = $temp; |
|
303 | 303 | |
304 | 304 | // Backtrack and check again. |
305 | 305 | if ($i > 1) |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | |
544 | 544 | // Use placeholders to preserve known emoji from further processing. |
545 | 545 | // Regex source is https://unicode.org/reports/tr51/#EBNF_and_Regex |
546 | - $string = preg_replace_callback( |
|
546 | + $string = preg_replace_callback( |
|
547 | 547 | '/' . |
548 | 548 | // Flag emojis |
549 | 549 | '[' . $prop_classes['Regional_Indicator'] . ']{2}' . |
@@ -572,7 +572,7 @@ discard block |
||
572 | 572 | ')?' . |
573 | 573 | ')*' . |
574 | 574 | '/u', |
575 | - function ($matches) use (&$placeholders) |
|
575 | + function($matches) use (&$placeholders) |
|
576 | 576 | { |
577 | 577 | // Skip lone ASCII characters that are not actully part of an emoji sequence. |
578 | 578 | // This can happen because the digits 0-9 and the '*' and '#' characters are |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | // Use placeholders for sanctioned variation selectors. |
604 | 604 | $string = preg_replace_callback( |
605 | 605 | $patterns, |
606 | - function ($matches) use (&$placeholders) |
|
606 | + function($matches) use (&$placeholders) |
|
607 | 607 | { |
608 | 608 | $placeholders[$matches[0]] = "\xEE\xB3\x9B" . md5($matches[0]) . "\xEE\xB3\x9C"; |
609 | 609 | return $placeholders[$matches[0]]; |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | // Do the thing. |
684 | 684 | $string = preg_replace_callback( |
685 | 685 | '/' . $pattern . '/u', |
686 | - function ($matches) use ($placeholders) |
|
686 | + function($matches) use ($placeholders) |
|
687 | 687 | { |
688 | 688 | return strtr($matches[0], $placeholders); |
689 | 689 | }, |
@@ -752,7 +752,7 @@ discard block |
||
752 | 752 | } |
753 | 753 | } |
754 | 754 | // This sort works decently well to ensure widely used scripts are ranked before rare scripts. |
755 | -uasort($funcs['utf8_regex_joining_type']['data'], function ($a, $b) |
|
755 | +uasort($funcs['utf8_regex_joining_type']['data'], function($a, $b) |
|
756 | 756 | { |
757 | 757 | if ($a['stats']['age'] == $b['stats']['age']) |
758 | 758 | { |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | } |
829 | 829 | } |
830 | 830 | // Again, sort commonly used scripts before rare scripts. |
831 | -uasort($funcs['utf8_regex_indic']['data'], function ($a, $b) |
|
831 | +uasort($funcs['utf8_regex_indic']['data'], function($a, $b) |
|
832 | 832 | { |
833 | 833 | if ($a['stats']['age'] == $b['stats']['age']) |
834 | 834 | { |