@@ -1696,8 +1696,7 @@ discard block |
||
1696 | 1696 | updateStats('topic'); |
1697 | 1697 | |
1698 | 1698 | // This function is needed to do the updateStats('subject') call. |
1699 | - $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : |
|
1700 | - function($string){ |
|
1699 | + $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) { |
|
1701 | 1700 | global $sourcedir; |
1702 | 1701 | if (function_exists('mb_strtolower')) |
1703 | 1702 | return mb_strtolower($string, 'UTF-8'); |
@@ -1766,7 +1765,7 @@ discard block |
||
1766 | 1765 | if (trim($settingsArray[$i]) == 'if (file_exists(dirname(__FILE__) . \'/install.php\'))' && trim($settingsArray[$i + 1]) == '{' && trim($settingsArray[$i + 9]) == '}') |
1767 | 1766 | { |
1768 | 1767 | // Set the ten lines to nothing. |
1769 | - for ($j=0; $j < 10; $j++) |
|
1768 | + for ($j = 0; $j < 10; $j++) |
|
1770 | 1769 | $settingsArray[$i++] = ''; |
1771 | 1770 | |
1772 | 1771 | continue; |
@@ -36,7 +36,8 @@ discard block |
||
36 | 36 | 'default_password' => 'mysql.default_password', |
37 | 37 | 'default_host' => 'mysql.default_host', |
38 | 38 | 'default_port' => 'mysql.default_port', |
39 | - 'utf8_support' => function() { |
|
39 | + 'utf8_support' => function() |
|
40 | + { |
|
40 | 41 | return true; |
41 | 42 | }, |
42 | 43 | 'utf8_version' => '5.0.22', |
@@ -44,7 +45,8 @@ discard block |
||
44 | 45 | 'utf8_default' => true, |
45 | 46 | 'utf8_required' => true, |
46 | 47 | 'alter_support' => true, |
47 | - 'validate_prefix' => function(&$value) { |
|
48 | + 'validate_prefix' => function(&$value) |
|
49 | + { |
|
48 | 50 | $value = preg_replace('~[^A-Za-z0-9_\$]~', '', $value); |
49 | 51 | return true; |
50 | 52 | }, |
@@ -58,7 +60,8 @@ discard block |
||
58 | 60 | 'always_has_db' => true, |
59 | 61 | 'utf8_default' => true, |
60 | 62 | 'utf8_required' => true, |
61 | - 'utf8_support' => function() { |
|
63 | + 'utf8_support' => function() |
|
64 | + { |
|
62 | 65 | $request = pg_query('SHOW SERVER_ENCODING'); |
63 | 66 | |
64 | 67 | list ($charcode) = pg_fetch_row($request); |
@@ -70,7 +73,8 @@ discard block |
||
70 | 73 | }, |
71 | 74 | 'utf8_version' => '8.0', |
72 | 75 | 'utf8_version_check' => '$request = pg_query(\'SELECT version()\'); list ($version) = pg_fetch_row($request); list($pgl, $version) = explode(" ", $version); return $version;', |
73 | - 'validate_prefix' => function(&$value) { |
|
76 | + 'validate_prefix' => function(&$value) |
|
77 | + { |
|
74 | 78 | global $txt; |
75 | 79 | |
76 | 80 | $value = preg_replace('~[^A-Za-z0-9_\$]~', '', $value); |
@@ -963,13 +967,15 @@ discard block |
||
963 | 967 | |
964 | 968 | // If redirect in effect, force ssl ON |
965 | 969 | require_once(dirname(__FILE__) . '/Sources/Subs.php'); |
966 | - if (https_redirect_active($incontext['detected_url'])) { |
|
970 | + if (https_redirect_active($incontext['detected_url'])) |
|
971 | + { |
|
967 | 972 | $incontext['ssl_chkbx_protected'] = true; |
968 | 973 | $incontext['ssl_chkbx_checked'] = true; |
969 | 974 | $_POST['force_ssl'] = true; |
970 | 975 | } |
971 | 976 | // If no cert, make sure ssl stays OFF |
972 | - if (!ssl_cert_found($incontext['detected_url'])) { |
|
977 | + if (!ssl_cert_found($incontext['detected_url'])) |
|
978 | + { |
|
973 | 979 | $incontext['ssl_chkbx_protected'] = true; |
974 | 980 | $incontext['ssl_chkbx_checked'] = false; |
975 | 981 | } |
@@ -1438,7 +1444,8 @@ discard block |
||
1438 | 1444 | reloadSettings(); |
1439 | 1445 | |
1440 | 1446 | // We need this to properly hash the password for Admin |
1441 | - $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) { |
|
1447 | + $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) |
|
1448 | + { |
|
1442 | 1449 | global $sourcedir; |
1443 | 1450 | if (function_exists('mb_strtolower')) |
1444 | 1451 | return mb_strtolower($string, 'UTF-8'); |
@@ -1696,7 +1703,8 @@ discard block |
||
1696 | 1703 | |
1697 | 1704 | // This function is needed to do the updateStats('subject') call. |
1698 | 1705 | $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : |
1699 | - function($string){ |
|
1706 | + function($string) |
|
1707 | + { |
|
1700 | 1708 | global $sourcedir; |
1701 | 1709 | if (function_exists('mb_strtolower')) |
1702 | 1710 | return mb_strtolower($string, 'UTF-8'); |
@@ -300,7 +300,7 @@ |
||
300 | 300 | echo ' |
301 | 301 | <div class="g-recaptcha centertext" data-sitekey="' . $verify_context['recaptcha_site_key'] . '" data-theme="' . $verify_context['recaptcha_theme'] . '"></div> |
302 | 302 | <br> |
303 | - <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl='.$lang.'"></script>'; |
|
303 | + <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl='.$lang . '"></script>'; |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | else |
@@ -104,7 +104,7 @@ |
||
104 | 104 | * |
105 | 105 | * @param string $class The fully-qualified class name. |
106 | 106 | */ |
107 | -spl_autoload_register(function ($class) use ($sourcedir) |
|
107 | +spl_autoload_register(function($class) use ($sourcedir) |
|
108 | 108 | { |
109 | 109 | $classMap = array( |
110 | 110 | 'ReCaptcha\\' => 'ReCaptcha/', |
@@ -841,13 +841,13 @@ discard block |
||
841 | 841 | // We're going to check that their board dir setting is right in case they've been moving stuff around. |
842 | 842 | if (strtr($boarddir, array('/' => '', '\\' => '')) != strtr(dirname(__FILE__), array('/' => '', '\\' => ''))) |
843 | 843 | $upcontext['warning'] = ' |
844 | - '. sprintf($txt['upgrade_boarddir_settings'], $boarddir, dirname(__FILE__)) .'<br> |
|
844 | + '. sprintf($txt['upgrade_boarddir_settings'], $boarddir, dirname(__FILE__)) . '<br> |
|
845 | 845 | <ul> |
846 | - <li>'. $txt['upgrade_boarddir'] .' ' . $boarddir . '</li> |
|
847 | - <li>'. $txt['upgrade_sourcedir'] .' ' . $boarddir . '</li> |
|
848 | - <li>'. $txt['upgrade_cachedir'] .' ' . $cachedir_temp . '</li> |
|
846 | + <li>'. $txt['upgrade_boarddir'] . ' ' . $boarddir . '</li> |
|
847 | + <li>'. $txt['upgrade_sourcedir'] . ' ' . $boarddir . '</li> |
|
848 | + <li>'. $txt['upgrade_cachedir'] . ' ' . $cachedir_temp . '</li> |
|
849 | 849 | </ul> |
850 | - '. $txt['upgrade_incorrect_settings'] .''; |
|
850 | + '. $txt['upgrade_incorrect_settings'] . ''; |
|
851 | 851 | |
852 | 852 | // Confirm mbstring is loaded... |
853 | 853 | if (!extension_loaded('mbstring')) |
@@ -1799,7 +1799,7 @@ discard block |
||
1799 | 1799 | |
1800 | 1800 | // Our custom error handler - does nothing but does stop public errors from XML! |
1801 | 1801 | set_error_handler( |
1802 | - function ($errno, $errstr, $errfile, $errline) use ($support_js) |
|
1802 | + function($errno, $errstr, $errfile, $errline) use ($support_js) |
|
1803 | 1803 | { |
1804 | 1804 | if ($support_js) |
1805 | 1805 | return true; |
@@ -2127,13 +2127,13 @@ discard block |
||
2127 | 2127 | |
2128 | 2128 | // Otherwise we have to display this somewhere appropriate if possible. |
2129 | 2129 | $upcontext['forced_error_message'] = ' |
2130 | - <strong>'. $txt['upgrade_unsuccessful'] .'</strong><br> |
|
2130 | + <strong>'. $txt['upgrade_unsuccessful'] . '</strong><br> |
|
2131 | 2131 | |
2132 | 2132 | <div style="margin: 2ex;"> |
2133 | - '. $txt['upgrade_thisquery'] .' |
|
2133 | + '. $txt['upgrade_thisquery'] . ' |
|
2134 | 2134 | <blockquote><pre>' . nl2br(htmlspecialchars(trim($string))) . ';</pre></blockquote> |
2135 | 2135 | |
2136 | - '. $txt['upgrade_causerror'] .' |
|
2136 | + '. $txt['upgrade_causerror'] . ' |
|
2137 | 2137 | <blockquote>' . nl2br(htmlspecialchars($db_error_message)) . '</blockquote> |
2138 | 2138 | </div> |
2139 | 2139 | |
@@ -2798,94 +2798,94 @@ discard block |
||
2798 | 2798 | // Translation table for the character sets not native for MySQL. |
2799 | 2799 | $translation_tables = array( |
2800 | 2800 | 'windows-1255' => array( |
2801 | - '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
2802 | - '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
2803 | - '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
2804 | - '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
2805 | - '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
2806 | - '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
2807 | - '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
2808 | - '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
2809 | - '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
2810 | - '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
2811 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2812 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2813 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2814 | - '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
2815 | - '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
2816 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2817 | - '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
2818 | - '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
2819 | - '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
2820 | - '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
2821 | - '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
2822 | - '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
2823 | - '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
2824 | - '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
2825 | - '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
2826 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2827 | - '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
2828 | - '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2829 | - '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
2830 | - '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
2831 | - '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
2832 | - '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
2833 | - '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
2834 | - '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
2835 | - '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
2836 | - '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
2837 | - '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
2838 | - '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
2839 | - '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
2840 | - '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
2841 | - '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
2842 | - '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
2801 | + '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
2802 | + '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
2803 | + '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
2804 | + '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
2805 | + '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
2806 | + '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
2807 | + '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
2808 | + '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
2809 | + '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
2810 | + '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
2811 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2812 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2813 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2814 | + '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
2815 | + '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
2816 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2817 | + '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
2818 | + '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
2819 | + '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
2820 | + '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
2821 | + '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
2822 | + '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
2823 | + '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
2824 | + '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
2825 | + '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
2826 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2827 | + '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
2828 | + '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2829 | + '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
2830 | + '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
2831 | + '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
2832 | + '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
2833 | + '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
2834 | + '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
2835 | + '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
2836 | + '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
2837 | + '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
2838 | + '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
2839 | + '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
2840 | + '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
2841 | + '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
2842 | + '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
2843 | 2843 | '0xFA' => '0xD7AA', |
2844 | 2844 | ), |
2845 | 2845 | 'windows-1253' => array( |
2846 | - '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
2847 | - '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
2848 | - '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
2849 | - '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
2850 | - '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
2851 | - '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
2852 | - '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
2853 | - '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
2854 | - '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
2855 | - '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
2856 | - '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
2857 | - '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
2858 | - '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
2859 | - '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
2860 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2861 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2862 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2863 | - '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
2864 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2865 | - '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
2866 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2867 | - '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
2868 | - '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
2869 | - '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
2870 | - '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2871 | - '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
2872 | - '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
2873 | - '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
2874 | - '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
2875 | - '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
2876 | - '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
2877 | - '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
2878 | - '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
2879 | - '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
2880 | - '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
2881 | - '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
2882 | - '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
2883 | - '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
2884 | - '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
2885 | - '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
2886 | - '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
2887 | - '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
2888 | - '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
2846 | + '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
2847 | + '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
2848 | + '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
2849 | + '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
2850 | + '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
2851 | + '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
2852 | + '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
2853 | + '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
2854 | + '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
2855 | + '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
2856 | + '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
2857 | + '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
2858 | + '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
2859 | + '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
2860 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
2861 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
2862 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
2863 | + '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
2864 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
2865 | + '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
2866 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
2867 | + '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
2868 | + '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
2869 | + '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
2870 | + '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
2871 | + '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
2872 | + '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
2873 | + '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
2874 | + '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
2875 | + '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
2876 | + '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
2877 | + '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
2878 | + '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
2879 | + '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
2880 | + '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
2881 | + '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
2882 | + '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
2883 | + '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
2884 | + '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
2885 | + '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
2886 | + '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
2887 | + '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
2888 | + '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
2889 | 2889 | ), |
2890 | 2890 | ); |
2891 | 2891 | |
@@ -3099,7 +3099,7 @@ discard block |
||
3099 | 3099 | |
3100 | 3100 | if ($upcontext['dropping_index'] && $command_line) |
3101 | 3101 | { |
3102 | - echo "\n" . '', $txt['upgrade_fulltext_error'] ,''; |
|
3102 | + echo "\n" . '', $txt['upgrade_fulltext_error'], ''; |
|
3103 | 3103 | flush(); |
3104 | 3104 | } |
3105 | 3105 | } |
@@ -3443,7 +3443,7 @@ discard block |
||
3443 | 3443 | { |
3444 | 3444 | echo ' |
3445 | 3445 | <div class="error"> |
3446 | - <p>', $txt['upgrade_writable_files'] ,'</p> |
|
3446 | + <p>', $txt['upgrade_writable_files'], '</p> |
|
3447 | 3447 | <ul class="error_content"> |
3448 | 3448 | <li>' . implode('</li> |
3449 | 3449 | <li>', $upcontext['chmod']['files']) . '</li> |
@@ -3809,12 +3809,12 @@ discard block |
||
3809 | 3809 | <div class="errorbox"> |
3810 | 3810 | <h3>', $txt['upgrade_warning'], '</h3> |
3811 | 3811 | <p>', sprintf($txt['upgrade_time_user'], $upcontext['user']['name']), '</p> |
3812 | - <p>', sprintf($txt[$agoTxt], $ago_seconds, $ago_minutes, $ago_hours), '</p> |
|
3812 | + <p>', sprintf($txt[$agoTxt], $ago_seconds, $ago_minutes, $ago_hours), '</p> |
|
3813 | 3813 | <p>', sprintf($txt[$updatedTxt], $updated_seconds, $updated_minutes, $updated_hours), '</p>'; |
3814 | 3814 | |
3815 | 3815 | if ($updated < 600) |
3816 | 3816 | echo ' |
3817 | - <p>', $txt['upgrade_run_script'], ' ', $upcontext['user']['name'],' ', $txt['upgrade_run_script2'], '</p>'; |
|
3817 | + <p>', $txt['upgrade_run_script'], ' ', $upcontext['user']['name'], ' ', $txt['upgrade_run_script2'], '</p>'; |
|
3818 | 3818 | |
3819 | 3819 | if ($updated > $upcontext['inactive_timeout']) |
3820 | 3820 | echo ' |
@@ -3923,7 +3923,7 @@ discard block |
||
3923 | 3923 | if (!empty($upcontext['upgrade_options_warning'])) |
3924 | 3924 | echo ' |
3925 | 3925 | <div class="errorbox"> |
3926 | - <h3>', $txt['upgrade_warning'] ,'</h3> |
|
3926 | + <h3>', $txt['upgrade_warning'], '</h3> |
|
3927 | 3927 | ', $upcontext['upgrade_options_warning'], ' |
3928 | 3928 | </div>'; |
3929 | 3929 | |
@@ -3993,7 +3993,7 @@ discard block |
||
3993 | 3993 | echo ' |
3994 | 3994 | <form action="', $upcontext['form_url'], '" name="upform" id="upform" method="post"> |
3995 | 3995 | <input type="hidden" name="backup_done" id="backup_done" value="0"> |
3996 | - <strong>', sprintf($txt['upgrade_completedtables_outof'], $upcontext['cur_table_num'], $upcontext['table_count']) ,'</strong> |
|
3996 | + <strong>', sprintf($txt['upgrade_completedtables_outof'], $upcontext['cur_table_num'], $upcontext['table_count']), '</strong> |
|
3997 | 3997 | <div id="debug_section"> |
3998 | 3998 | <span id="debuginfo"></span> |
3999 | 3999 | </div>'; |
@@ -295,7 +295,8 @@ discard block |
||
295 | 295 | // Call the step and if it returns false that means pause! |
296 | 296 | if (function_exists($step[2]) && $step[2]() === false) |
297 | 297 | break; |
298 | - elseif (function_exists($step[2])) { |
|
298 | + elseif (function_exists($step[2])) |
|
299 | + { |
|
299 | 300 | //Start each new step with this unset, so the 'normal' template is called first |
300 | 301 | unset($_GET['xml']); |
301 | 302 | //Clear out warnings at the start of each step |
@@ -2915,7 +2916,8 @@ discard block |
||
2915 | 2916 | $upcontext['step_progress'] = (int) (($upcontext['cur_table_num'] / $upcontext['table_count']) * 100); |
2916 | 2917 | |
2917 | 2918 | // Make sure we're ready & have painted the template before proceeding |
2918 | - if ($support_js && !isset($_GET['xml'])) { |
|
2919 | + if ($support_js && !isset($_GET['xml'])) |
|
2920 | + { |
|
2919 | 2921 | $_GET['substep'] = 0; |
2920 | 2922 | return false; |
2921 | 2923 | } |
@@ -2968,7 +2970,8 @@ discard block |
||
2968 | 2970 | list($charset) = explode('_', $collation); |
2969 | 2971 | |
2970 | 2972 | // Build structure of columns to operate on organized by charset; only operate on columns not yet utf8 |
2971 | - if ($charset != 'utf8') { |
|
2973 | + if ($charset != 'utf8') |
|
2974 | + { |
|
2972 | 2975 | if (!isset($table_charsets[$charset])) |
2973 | 2976 | $table_charsets[$charset] = array(); |
2974 | 2977 |
@@ -3392,7 +3392,7 @@ discard block |
||
3392 | 3392 | |
3393 | 3393 | $regex = <<<'EOT' |
3394 | 3394 | (\s*#\s*Make\s+sure\s+the\s+paths\s+are\s+correct\.\.\.\s+at\s+least\s+try\s+to\s+fix\s+them\.\s+)?if\s*\(\!file_exists\(\$boarddir\)\s+&&\s+file_exists\(dirname\(__FILE__\)\s+\.\s+'/agreement\.txt'\)\)\s+\$boarddir\s*\=\s*dirname\(__FILE__\);\s+if\s*\(\!file_exists\(\$sourcedir\)\s+&&\s+file_exists\(\$boarddir\s*\.\s*'/Sources'\)\)\s+\$sourcedir\s*\=\s*\$boarddir\s*\.\s*'/Sources';\s+if\s*\(\!file_exists\(\$cachedir\)\s+&&\s+file_exists\(\$boarddir\s*\.\s*'/cache'\)\)\s+\$cachedir\s*\=\s*\$boarddir\s*\.\s*'/cache'; |
3395 | -EOT; |
|
3395 | +eot; |
|
3396 | 3396 | |
3397 | 3397 | $replacement = <<<'EOT' |
3398 | 3398 | # Make sure the paths are correct... at least try to fix them. |
@@ -3404,7 +3404,7 @@ discard block |
||
3404 | 3404 | $cachedir = $boarddir . '/cache'; |
3405 | 3405 | |
3406 | 3406 | |
3407 | -EOT; |
|
3407 | +eot; |
|
3408 | 3408 | |
3409 | 3409 | if (preg_match('~' . $regex . '~', $settings) && preg_match('~(#+\s*Error-Catching\s*#+)~', $settings)) |
3410 | 3410 | { |
@@ -429,7 +429,7 @@ |
||
429 | 429 | */ |
430 | 430 | function matchIPtoCIDR($ip_address, $cidr_address) |
431 | 431 | { |
432 | - list ($cidr_network, $cidr_subnetmask) = preg_split('/', $cidr_address); |
|
432 | + list ($cidr_network, $cidr_subnetmask) = preg_split('/', $cidr_address); |
|
433 | 433 | |
434 | 434 | //v6? |
435 | 435 | if ((strpos($cidr_network, ':') !== false)) |
@@ -454,7 +454,7 @@ |
||
454 | 454 | break; |
455 | 455 | } |
456 | 456 | $binMask = str_pad($binMask, 32, '0'); |
457 | - $binMask = pack("H*" , $binMask); |
|
457 | + $binMask = pack("H*", $binMask); |
|
458 | 458 | |
459 | 459 | return ($ip_address & $binMask) == $cidr_network; |
460 | 460 | } |
@@ -440,7 +440,8 @@ |
||
440 | 440 | $ip_address = inet_pton($ip_address); |
441 | 441 | $cidr_network = inet_pton($cidr_network); |
442 | 442 | $binMask = str_repeat("f", $cidr_subnetmask / 4); |
443 | - switch ($cidr_subnetmask % 4) { |
|
443 | + switch ($cidr_subnetmask % 4) |
|
444 | + { |
|
444 | 445 | case 0: |
445 | 446 | break; |
446 | 447 | case 1: |
@@ -1744,9 +1744,9 @@ |
||
1744 | 1744 | $context['theme_files'] = get_file_listing($currentTheme['theme_dir'], ''); |
1745 | 1745 | |
1746 | 1746 | // Do not list minified_ files |
1747 | - foreach($context['theme_files'] as $key=>$file) |
|
1747 | + foreach ($context['theme_files'] as $key=>$file) |
|
1748 | 1748 | { |
1749 | - if(strpos($file['filename'], 'minified_') !== FALSE) |
|
1749 | + if (strpos($file['filename'], 'minified_') !== FALSE) |
|
1750 | 1750 | unset($context['theme_files'][$key]); |
1751 | 1751 | } |
1752 | 1752 |
@@ -1364,7 +1364,6 @@ |
||
1364 | 1364 | // return all the info. |
1365 | 1365 | return $context['to_install']; |
1366 | 1366 | } |
1367 | - |
|
1368 | 1367 | else |
1369 | 1368 | fatal_lang_error('theme_install_error_title', false); |
1370 | 1369 | } |
@@ -1746,7 +1746,7 @@ |
||
1746 | 1746 | // Do not list minified_ files |
1747 | 1747 | foreach($context['theme_files'] as $key=>$file) |
1748 | 1748 | { |
1749 | - if(strpos($file['filename'], 'minified_') !== FALSE) |
|
1749 | + if(strpos($file['filename'], 'minified_') !== false) |
|
1750 | 1750 | unset($context['theme_files'][$key]); |
1751 | 1751 | } |
1752 | 1752 |
@@ -849,7 +849,6 @@ |
||
849 | 849 | die("\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B"); |
850 | 850 | } |
851 | 851 | } |
852 | - |
|
853 | 852 | elseif ($_REQUEST['format'] === '.wav') |
854 | 853 | { |
855 | 854 | require_once($sourcedir . '/Subs-Sound.php'); |
@@ -253,9 +253,10 @@ discard block |
||
253 | 253 | |
254 | 254 | // Phar doesn't handle open_basedir restrictions very well and throws a PHP Warning. Ignore that. |
255 | 255 | set_error_handler(function($errno, $errstr, $errfile, $errline) |
256 | - { |
|
256 | + { |
|
257 | 257 | // error was suppressed with the @-operator |
258 | - if (0 === error_reporting()) { |
|
258 | + if (0 === error_reporting()) |
|
259 | + { |
|
259 | 260 | return false; |
260 | 261 | } |
261 | 262 | if (strpos($errstr, 'PharData::__construct(): open_basedir') === false) |
@@ -269,7 +270,7 @@ discard block |
||
269 | 270 | |
270 | 271 | // go though each file in the archive |
271 | 272 | foreach ($iterator as $file_info) |
272 | - { |
|
273 | + { |
|
273 | 274 | $i = $iterator->getSubPathname(); |
274 | 275 | // If this is a file, and it doesn't exist.... happy days! |
275 | 276 | if (substr($i, -1) != '/' && !file_exists($destination . '/' . $i)) |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $smcFunc['db_free_result']($result_boards); |
136 | 136 | |
137 | 137 | // Run through the categories and boards (or only boards).... |
138 | - for (reset($row_boards); key($row_boards)!==null; next($row_boards)) |
|
138 | + for (reset($row_boards); key($row_boards) !== null; next($row_boards)) |
|
139 | 139 | { |
140 | 140 | $row_board = current($row_boards); |
141 | 141 | |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | $row_boards[$row_board['id_parent']]['id_msg'] = $row_board['id_msg']; |
304 | 304 | $row_boards[$row_board['id_parent']]['subject'] = $row_board['subject']; |
305 | 305 | $row_boards[$row_board['id_parent']]['poster_time'] = $row_board['poster_time']; |
306 | - $row_boards[$row_board['id_parent']]['short_subject'] = (!empty($row_board['short_subject']) ? $row_board['short_subject'] : '') ; |
|
306 | + $row_boards[$row_board['id_parent']]['short_subject'] = (!empty($row_board['short_subject']) ? $row_board['short_subject'] : ''); |
|
307 | 307 | $row_boards[$row_board['id_parent']]['poster_name'] = $row_board['poster_name']; |
308 | 308 | $row_boards[$row_board['id_parent']]['real_name'] = $row_board['real_name']; |
309 | 309 | $row_boards[$row_board['id_parent']]['id_member'] = $row_board['id_member']; |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | |
369 | 369 | // Set the last post in the root board |
370 | 370 | if (!$isChild && !empty($row_board['poster_time']) |
371 | - && ( empty($this_category[$row_board['id_board']]['last_post']['timestamp']) |
|
371 | + && (empty($this_category[$row_board['id_board']]['last_post']['timestamp']) |
|
372 | 372 | || $this_category[$row_board['id_board']]['last_post']['timestamp'] < forum_time(true, $row_board['poster_time']) |
373 | 373 | ) |
374 | 374 | ) |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | if ($boardIndexOptions['include_categories']) |
399 | 399 | foreach ($categories as &$category) |
400 | 400 | { |
401 | - foreach ($category['boards'] as &$board ) |
|
401 | + foreach ($category['boards'] as &$board) |
|
402 | 402 | { |
403 | 403 | if (!empty($moderators[$board['id']])) |
404 | 404 | { |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | } |
421 | 421 | } |
422 | 422 | else |
423 | - foreach ($this_category as &$board ) |
|
423 | + foreach ($this_category as &$board) |
|
424 | 424 | { |
425 | 425 | if (!empty($moderators[$board['id']])) |
426 | 426 | { |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | $board['last_post']['last_post_message'] = sprintf($txt['last_post_message'], $board['last_post']['member']['link'], $board['last_post']['link'], $board['last_post']['time'] > 0 ? timeformat($board['last_post']['time']) : $txt['not_applicable']); |
442 | 442 | } |
443 | 443 | |
444 | - unset($category,$board); |
|
444 | + unset($category, $board); |
|
445 | 445 | |
446 | 446 | if ($boardIndexOptions['include_categories']) |
447 | 447 | sortCategories($categories); |
@@ -419,7 +419,7 @@ |
||
419 | 419 | $board['last_post']['last_post_message'] = sprintf($txt['last_post_message'], $board['last_post']['member']['link'], $board['last_post']['link'], $board['last_post']['time'] > 0 ? timeformat($board['last_post']['time']) : $txt['not_applicable']); |
420 | 420 | } |
421 | 421 | } |
422 | - else |
|
422 | + else |
|
423 | 423 | foreach ($this_category as &$board ) |
424 | 424 | { |
425 | 425 | if (!empty($moderators[$board['id']])) |