@@ -121,7 +121,7 @@ |
||
121 | 121 | |
122 | 122 | $files = array_unique(array_merge($always_update, array_filter( |
123 | 123 | explode("\n", shell_exec('git diff --name-only v' . $prev_version . '...HEAD')), |
124 | - function ($filename) |
|
124 | + function($filename) |
|
125 | 125 | { |
126 | 126 | return file_exists($filename) && strpos(mime_content_type($filename), 'text/') === 0; |
127 | 127 | } |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | } |
930 | 930 | } |
931 | 931 | // This sort works decently well to ensure widely used scripts are ranked before rare scripts. |
932 | -uasort($funcs['utf8_regex_joining_type']['data'], function ($a, $b) |
|
932 | +uasort($funcs['utf8_regex_joining_type']['data'], function($a, $b) |
|
933 | 933 | { |
934 | 934 | if ($a['stats']['age'] == $b['stats']['age']) |
935 | 935 | { |
@@ -1004,7 +1004,7 @@ discard block |
||
1004 | 1004 | } |
1005 | 1005 | } |
1006 | 1006 | // Again, sort commonly used scripts before rare scripts. |
1007 | -uasort($funcs['utf8_regex_indic']['data'], function ($a, $b) |
|
1007 | +uasort($funcs['utf8_regex_indic']['data'], function($a, $b) |
|
1008 | 1008 | { |
1009 | 1009 | if ($a['stats']['age'] == $b['stats']['age']) |
1010 | 1010 | { |
@@ -1285,7 +1285,7 @@ discard block |
||
1285 | 1285 | |
1286 | 1286 | $func_text = rtrim($func_text); |
1287 | 1287 | |
1288 | - $func_text .= $nextline . implode(' .' . $nextline, array_map(function ($v) { return var_export($v, true); }, $value)); |
|
1288 | + $func_text .= $nextline . implode(' .' . $nextline, array_map(function($v) { return var_export($v, true); }, $value)); |
|
1289 | 1289 | } |
1290 | 1290 | else |
1291 | 1291 | { |
@@ -1285,7 +1285,9 @@ |
||
1285 | 1285 | |
1286 | 1286 | $func_text = rtrim($func_text); |
1287 | 1287 | |
1288 | - $func_text .= $nextline . implode(' .' . $nextline, array_map(function ($v) { return var_export($v, true); }, $value)); |
|
1288 | + $func_text .= $nextline . implode(' .' . $nextline, array_map(function ($v) |
|
1289 | + { |
|
1290 | +return var_export($v, true); }, $value)); |
|
1289 | 1291 | } |
1290 | 1292 | else |
1291 | 1293 | { |
@@ -1092,7 +1092,7 @@ |
||
1092 | 1092 | // PHP currently has a terrible handling with unserialize in which errors are fatal and not catchable. Lets borrow some code from the RFC that intends to fix this |
1093 | 1093 | // https://wiki.php.net/rfc/improve_unserialize_error_handling |
1094 | 1094 | try { |
1095 | - set_error_handler(static function ($severity, $message, $file, $line) { |
|
1095 | + set_error_handler(static function ($severity, $message, $file, $line) { |
|
1096 | 1096 | throw new \ErrorException($message, 0, $severity, $file, $line); |
1097 | 1097 | }); |
1098 | 1098 | $ser_test = @unserialize($modSettings['attachmentUploadDir']); |
@@ -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); |
@@ -1092,7 +1092,7 @@ discard block |
||
1092 | 1092 | // PHP currently has a terrible handling with unserialize in which errors are fatal and not catchable. Lets borrow some code from the RFC that intends to fix this |
1093 | 1093 | // https://wiki.php.net/rfc/improve_unserialize_error_handling |
1094 | 1094 | try { |
1095 | - set_error_handler(static function ($severity, $message, $file, $line) { |
|
1095 | + set_error_handler(static function($severity, $message, $file, $line) { |
|
1096 | 1096 | throw new \ErrorException($message, 0, $severity, $file, $line); |
1097 | 1097 | }); |
1098 | 1098 | $ser_test = @unserialize($modSettings['attachmentUploadDir']); |
@@ -1121,7 +1121,7 @@ discard block |
||
1121 | 1121 | // An array already? |
1122 | 1122 | elseif (is_array($modSettings['attachmentUploadDir'])) |
1123 | 1123 | { |
1124 | - foreach($modSettings['attachmentUploadDir'] AS $dir) |
|
1124 | + foreach ($modSettings['attachmentUploadDir'] AS $dir) |
|
1125 | 1125 | if (!empty($dir) && !is_dir($dir)) |
1126 | 1126 | $attdr_problem_found = true; |
1127 | 1127 | } |
@@ -1130,7 +1130,7 @@ discard block |
||
1130 | 1130 | { |
1131 | 1131 | if (is_array($ser_test)) |
1132 | 1132 | { |
1133 | - foreach($ser_test AS $dir) |
|
1133 | + foreach ($ser_test AS $dir) |
|
1134 | 1134 | { |
1135 | 1135 | if (!empty($dir) && !is_dir($dir)) |
1136 | 1136 | $attdr_problem_found = true; |
@@ -1147,7 +1147,7 @@ discard block |
||
1147 | 1147 | { |
1148 | 1148 | if (is_array($json_test)) |
1149 | 1149 | { |
1150 | - foreach($json_test AS $dir) |
|
1150 | + foreach ($json_test AS $dir) |
|
1151 | 1151 | { |
1152 | 1152 | if (!is_dir($dir)) |
1153 | 1153 | $attdr_problem_found = true; |
@@ -3147,94 +3147,94 @@ discard block |
||
3147 | 3147 | // Translation table for the character sets not native for MySQL. |
3148 | 3148 | $translation_tables = array( |
3149 | 3149 | 'windows-1255' => array( |
3150 | - '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
3151 | - '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
3152 | - '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
3153 | - '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
3154 | - '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
3155 | - '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
3156 | - '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
3157 | - '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
3158 | - '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
3159 | - '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
3160 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3161 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3162 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3163 | - '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
3164 | - '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
3165 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3166 | - '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
3167 | - '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
3168 | - '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
3169 | - '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
3170 | - '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
3171 | - '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
3172 | - '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
3173 | - '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
3174 | - '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
3175 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3176 | - '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
3177 | - '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3178 | - '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
3179 | - '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
3180 | - '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
3181 | - '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
3182 | - '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
3183 | - '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
3184 | - '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
3185 | - '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
3186 | - '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
3187 | - '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
3188 | - '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
3189 | - '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
3190 | - '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
3191 | - '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
3150 | + '0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'', |
|
3151 | + '0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'', |
|
3152 | + '0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'', |
|
3153 | + '0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'', |
|
3154 | + '0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'', |
|
3155 | + '0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'', |
|
3156 | + '0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792', |
|
3157 | + '0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF', |
|
3158 | + '0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0', |
|
3159 | + '0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3', |
|
3160 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3161 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3162 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3163 | + '0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', |
|
3164 | + '0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4', |
|
3165 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3166 | + '0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB', |
|
3167 | + '0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE', |
|
3168 | + '0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781', |
|
3169 | + '0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2', |
|
3170 | + '0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C', |
|
3171 | + '0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F', |
|
3172 | + '0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2', |
|
3173 | + '0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6', |
|
3174 | + '0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9', |
|
3175 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3176 | + '0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0', |
|
3177 | + '0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3178 | + '0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2', |
|
3179 | + '0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3', |
|
3180 | + '0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6', |
|
3181 | + '0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9', |
|
3182 | + '0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD', |
|
3183 | + '0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780', |
|
3184 | + '0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794', |
|
3185 | + '0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799', |
|
3186 | + '0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099', |
|
3187 | + '0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86', |
|
3188 | + '0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093', |
|
3189 | + '0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397', |
|
3190 | + '0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796', |
|
3191 | + '0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4', |
|
3192 | 3192 | '0xFA' => '0xD7AA', |
3193 | 3193 | ), |
3194 | 3194 | 'windows-1253' => array( |
3195 | - '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
3196 | - '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
3197 | - '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
3198 | - '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
3199 | - '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
3200 | - '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
3201 | - '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
3202 | - '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
3203 | - '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
3204 | - '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
3205 | - '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
3206 | - '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
3207 | - '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
3208 | - '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
3209 | - '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3210 | - '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3211 | - '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3212 | - '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
3213 | - '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3214 | - '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
3215 | - '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3216 | - '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
3217 | - '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
3218 | - '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
3219 | - '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3220 | - '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
3221 | - '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
3222 | - '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
3223 | - '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
3224 | - '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
3225 | - '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
3226 | - '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
3227 | - '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
3228 | - '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
3229 | - '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
3230 | - '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
3231 | - '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
3232 | - '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
3233 | - '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
3234 | - '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
3235 | - '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
3236 | - '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
3237 | - '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
3195 | + '0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'', |
|
3196 | + '0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'', |
|
3197 | + '0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'', |
|
3198 | + '0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'', |
|
3199 | + '0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'', |
|
3200 | + '0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E', |
|
3201 | + '0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C', |
|
3202 | + '0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90', |
|
3203 | + '0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C', |
|
3204 | + '0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA', |
|
3205 | + '0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC', |
|
3206 | + '0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF', |
|
3207 | + '0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2', |
|
3208 | + '0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4', |
|
3209 | + '0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7', |
|
3210 | + '0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB', |
|
3211 | + '0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE', |
|
3212 | + '0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3', |
|
3213 | + '0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7', |
|
3214 | + '0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2', |
|
3215 | + '0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6', |
|
3216 | + '0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86', |
|
3217 | + '0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89', |
|
3218 | + '0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2', |
|
3219 | + '0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D', |
|
3220 | + '0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094', |
|
3221 | + '0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84', |
|
3222 | + '0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94', |
|
3223 | + '0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692', |
|
3224 | + '0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B', |
|
3225 | + '0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3', |
|
3226 | + '0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6', |
|
3227 | + '0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9', |
|
3228 | + '0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD', |
|
3229 | + '0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0', |
|
3230 | + '0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4', |
|
3231 | + '0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7', |
|
3232 | + '0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80', |
|
3233 | + '0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83', |
|
3234 | + '0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86', |
|
3235 | + '0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89', |
|
3236 | + '0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C', |
|
3237 | + '0xFD' => '0xCF8D', '0xFE' => '0xCF8E', |
|
3238 | 3238 | ), |
3239 | 3239 | ); |
3240 | 3240 | |
@@ -3494,7 +3494,7 @@ discard block |
||
3494 | 3494 | // This bit fixes incorrect string lengths, which can happen if the character encoding was changed (e.g. conversion to UTF-8) |
3495 | 3495 | $new_string = preg_replace_callback( |
3496 | 3496 | '~\bs:(\d+):"(.*?)";(?=$|[bidsaO]:|[{}}]|N;)~s', |
3497 | - function ($matches) |
|
3497 | + function($matches) |
|
3498 | 3498 | { |
3499 | 3499 | return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";'; |
3500 | 3500 | }, |
@@ -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(); |
@@ -1091,22 +1093,30 @@ discard block |
||
1091 | 1093 | |
1092 | 1094 | // PHP currently has a terrible handling with unserialize in which errors are fatal and not catchable. Lets borrow some code from the RFC that intends to fix this |
1093 | 1095 | // https://wiki.php.net/rfc/improve_unserialize_error_handling |
1094 | - try { |
|
1095 | - set_error_handler(static function ($severity, $message, $file, $line) { |
|
1096 | + try |
|
1097 | + { |
|
1098 | + set_error_handler(static function ($severity, $message, $file, $line) |
|
1099 | + { |
|
1096 | 1100 | throw new \ErrorException($message, 0, $severity, $file, $line); |
1097 | 1101 | }); |
1098 | 1102 | $ser_test = @unserialize($modSettings['attachmentUploadDir']); |
1099 | - } catch (\Throwable $e) { |
|
1103 | + } |
|
1104 | + catch (\Throwable $e) |
|
1105 | + { |
|
1100 | 1106 | $ser_test = false; |
1101 | 1107 | } |
1102 | - finally { |
|
1108 | + finally |
|
1109 | + { |
|
1103 | 1110 | restore_error_handler(); |
1104 | 1111 | } |
1105 | 1112 | |
1106 | 1113 | // Json is simple, it can be caught. |
1107 | - try { |
|
1114 | + try |
|
1115 | + { |
|
1108 | 1116 | $json_test = @json_decode($modSettings['attachmentUploadDir'], true); |
1109 | - } catch (\Throwable $e) { |
|
1117 | + } |
|
1118 | + catch (\Throwable $e) |
|
1119 | + { |
|
1110 | 1120 | $json_test = null; |
1111 | 1121 | } |
1112 | 1122 |
@@ -1121,7 +1121,7 @@ discard block |
||
1121 | 1121 | // An array already? |
1122 | 1122 | elseif (is_array($modSettings['attachmentUploadDir'])) |
1123 | 1123 | { |
1124 | - foreach($modSettings['attachmentUploadDir'] AS $dir) |
|
1124 | + foreach($modSettings['attachmentUploadDir'] as $dir) |
|
1125 | 1125 | if (!empty($dir) && !is_dir($dir)) |
1126 | 1126 | $attdr_problem_found = true; |
1127 | 1127 | } |
@@ -1130,7 +1130,7 @@ discard block |
||
1130 | 1130 | { |
1131 | 1131 | if (is_array($ser_test)) |
1132 | 1132 | { |
1133 | - foreach($ser_test AS $dir) |
|
1133 | + foreach($ser_test as $dir) |
|
1134 | 1134 | { |
1135 | 1135 | if (!empty($dir) && !is_dir($dir)) |
1136 | 1136 | $attdr_problem_found = true; |
@@ -1147,7 +1147,7 @@ discard block |
||
1147 | 1147 | { |
1148 | 1148 | if (is_array($json_test)) |
1149 | 1149 | { |
1150 | - foreach($json_test AS $dir) |
|
1150 | + foreach($json_test as $dir) |
|
1151 | 1151 | { |
1152 | 1152 | if (!is_dir($dir)) |
1153 | 1153 | $attdr_problem_found = true; |
@@ -3309,7 +3309,7 @@ discard block |
||
3309 | 3309 | // Deleting an existing label? |
3310 | 3310 | elseif (isset($_POST['delete'], $_POST['delete_label'])) |
3311 | 3311 | { |
3312 | - foreach ($_POST['delete_label'] AS $label => $dummy) |
|
3312 | + foreach ($_POST['delete_label'] as $label => $dummy) |
|
3313 | 3313 | { |
3314 | 3314 | if (array_key_exists($label, $the_labels)) |
3315 | 3315 | { |
@@ -3353,7 +3353,7 @@ discard block |
||
3353 | 3353 | if (!empty($labels_to_add)) |
3354 | 3354 | { |
3355 | 3355 | $inserts = array(); |
3356 | - foreach ($labels_to_add AS $label) |
|
3356 | + foreach ($labels_to_add as $label) |
|
3357 | 3357 | $inserts[] = array($user_info['id'], $label); |
3358 | 3358 | |
3359 | 3359 | $smcFunc['db_insert']('', '{db_prefix}pm_labels', array('id_member' => 'int', 'name' => 'string-30'), $inserts, array()); |
@@ -3362,7 +3362,7 @@ discard block |
||
3362 | 3362 | // Update existing labels as needed |
3363 | 3363 | if (!empty($label_updates)) |
3364 | 3364 | { |
3365 | - foreach ($label_updates AS $id => $name) |
|
3365 | + foreach ($label_updates as $id => $name) |
|
3366 | 3366 | { |
3367 | 3367 | $smcFunc['db_query']('', ' |
3368 | 3368 | UPDATE {db_prefix}pm_labels |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | $combining_classes = utf8_combining_classes(); |
548 | 548 | |
549 | 549 | // Replace characters with decomposed forms. |
550 | - for ($i=0; $i < count($chars); $i++) |
|
550 | + for ($i = 0; $i < count($chars); $i++) |
|
551 | 551 | { |
552 | 552 | // Hangul characters. |
553 | 553 | // See "Hangul Syllable Decomposition" in the Unicode standard, ch. 3.12. |
@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | { |
583 | 583 | $temp = $chars[$i]; |
584 | 584 | $chars[$i] = $chars[$i - 1]; |
585 | - $chars[$i -1] = $temp; |
|
585 | + $chars[$i - 1] = $temp; |
|
586 | 586 | |
587 | 587 | // Backtrack and check again. |
588 | 588 | if ($i > 1) |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | |
827 | 827 | // Use placeholders to preserve known emoji from further processing. |
828 | 828 | // Regex source is https://unicode.org/reports/tr51/#EBNF_and_Regex |
829 | - $string = preg_replace_callback( |
|
829 | + $string = preg_replace_callback( |
|
830 | 830 | '/' . |
831 | 831 | // Flag emojis |
832 | 832 | '[' . $prop_classes['Regional_Indicator'] . ']{2}' . |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | ')?' . |
856 | 856 | ')*' . |
857 | 857 | '/u', |
858 | - function ($matches) use (&$placeholders) |
|
858 | + function($matches) use (&$placeholders) |
|
859 | 859 | { |
860 | 860 | // Skip lone ASCII characters that are not actually part of an emoji sequence. |
861 | 861 | // This can happen because the digits 0-9 and the '*' and '#' characters are |
@@ -886,7 +886,7 @@ discard block |
||
886 | 886 | // Use placeholders for sanctioned variation selectors. |
887 | 887 | $string = preg_replace_callback( |
888 | 888 | $patterns, |
889 | - function ($matches) use (&$placeholders) |
|
889 | + function($matches) use (&$placeholders) |
|
890 | 890 | { |
891 | 891 | $placeholders[$matches[0]] = "\xEE\xB3\x9B" . md5($matches[0]) . "\xEE\xB3\x9C"; |
892 | 892 | return $placeholders[$matches[0]]; |
@@ -966,7 +966,7 @@ discard block |
||
966 | 966 | // Do the thing. |
967 | 967 | $string = preg_replace_callback( |
968 | 968 | '/' . $pattern . '/u', |
969 | - function ($matches) use ($placeholders) |
|
969 | + function($matches) use ($placeholders) |
|
970 | 970 | { |
971 | 971 | return strtr($matches[0], $placeholders); |
972 | 972 | }, |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | { |
380 | 380 | $val = 'CASE '; |
381 | 381 | foreach ($members as $k => $v) |
382 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
382 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
383 | 383 | |
384 | 384 | $val = $val . ' END'; |
385 | 385 | $type = 'raw'; |
@@ -851,12 +851,12 @@ discard block |
||
851 | 851 | // Anything that isn't a specification, punctuation mark, or whitespace. |
852 | 852 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
853 | 853 | // Repeated punctuation marks (except %), possibly separated by whitespace. |
854 | - '~(?'.'>([^%\P{P}])\s*(?=\1))*~u', |
|
855 | - '~([^%\P{P}])(?'.'>\1(?!$))*~u', |
|
854 | + '~(?' . '>([^%\P{P}])\s*(?=\1))*~u', |
|
855 | + '~([^%\P{P}])(?' . '>\1(?!$))*~u', |
|
856 | 856 | // Unwanted trailing punctuation and whitespace. |
857 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
857 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
858 | 858 | // Unwanted opening punctuation and whitespace. |
859 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
859 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
860 | 860 | // Runs of horizontal whitespace. |
861 | 861 | '~\s+~', |
862 | 862 | ), |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | { |
1164 | 1164 | $dates[$tzid . '_' . $timestamp]['results'][$format] = preg_replace_callback( |
1165 | 1165 | '/\xEE\x84\xA0([\d_]+)(\xEE\x84(?:[\xA1-\xAF]))/', |
1166 | - function ($matches) |
|
1166 | + function($matches) |
|
1167 | 1167 | { |
1168 | 1168 | switch ($matches[2]) |
1169 | 1169 | { |
@@ -1297,7 +1297,7 @@ discard block |
||
1297 | 1297 | elseif (!empty($context['character_set']) && is_callable('mb_decode_numericentity')) |
1298 | 1298 | { |
1299 | 1299 | // Get whatever the default replacement character is for this encoding. |
1300 | - $substitute = mb_decode_numericentity('�', array(0xFFFD,0xFFFD,0,0xFFFF), $context['character_set']); |
|
1300 | + $substitute = mb_decode_numericentity('�', array(0xFFFD, 0xFFFD, 0, 0xFFFF), $context['character_set']); |
|
1301 | 1301 | } |
1302 | 1302 | else |
1303 | 1303 | $substitute = '?'; |
@@ -1747,7 +1747,7 @@ discard block |
||
1747 | 1747 | |
1748 | 1748 | // parseAttachBBC will return a string ($txt key) rather than dying with a fatal_error. Up to you to decide what to do. |
1749 | 1749 | if (is_string($currentAttachment)) |
1750 | - return $data = '<span style="display:inline-block" class="errorbox">' . (!empty($txt[$currentAttachment]) ? $txt[$currentAttachment] : $currentAttachment) . '</span>'; |
|
1750 | + return $data = '<span style="display:inline-block" class="errorbox">' . (!empty($txt[$currentAttachment]) ? $txt[$currentAttachment] : $currentAttachment) . '</span>'; |
|
1751 | 1751 | |
1752 | 1752 | // We need a display mode. |
1753 | 1753 | if (empty($params['{display}'])) |
@@ -1773,7 +1773,7 @@ discard block |
||
1773 | 1773 | $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">'; |
1774 | 1774 | else |
1775 | 1775 | { |
1776 | - $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': ''; |
|
1776 | + $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
|
1777 | 1777 | $height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : ''; |
1778 | 1778 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>'; |
1779 | 1779 | } |
@@ -1784,7 +1784,7 @@ discard block |
||
1784 | 1784 | $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
1785 | 1785 | $height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : ''; |
1786 | 1786 | |
1787 | - $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>' : ''); |
|
1787 | + $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>' : ''); |
|
1788 | 1788 | } |
1789 | 1789 | // Audio. |
1790 | 1790 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1792,7 +1792,7 @@ discard block |
||
1792 | 1792 | $width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;'; |
1793 | 1793 | $height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : ''; |
1794 | 1794 | |
1795 | - $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>'; |
|
1795 | + $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>'; |
|
1796 | 1796 | } |
1797 | 1797 | // Anything else. |
1798 | 1798 | else |
@@ -1961,7 +1961,7 @@ discard block |
||
1961 | 1961 | 'type' => 'unparsed_commas_content', |
1962 | 1962 | 'test' => '\d+,\d+\]', |
1963 | 1963 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1964 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1964 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1965 | 1965 | { |
1966 | 1966 | $data[0] = normalize_iri(strtr(trim($data[0]), array('<br>' => '', ' ' => '%20'))); |
1967 | 1967 | |
@@ -2087,8 +2087,8 @@ discard block |
||
2087 | 2087 | else |
2088 | 2088 | $url = get_proxied_url($url); |
2089 | 2089 | |
2090 | - $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""'; |
|
2091 | - $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
2090 | + $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""'; |
|
2091 | + $title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : ''; |
|
2092 | 2092 | |
2093 | 2093 | $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">'; |
2094 | 2094 | }, |
@@ -2526,12 +2526,12 @@ discard block |
||
2526 | 2526 | $codes[] = array( |
2527 | 2527 | 'tag' => 'cowsay', |
2528 | 2528 | 'parameters' => array( |
2529 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2529 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2530 | 2530 | { |
2531 | 2531 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2532 | 2532 | }, |
2533 | 2533 | ), |
2534 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2534 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2535 | 2535 | { |
2536 | 2536 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2537 | 2537 | }, |
@@ -4236,7 +4236,7 @@ discard block |
||
4236 | 4236 | if ($fp != false) |
4237 | 4237 | { |
4238 | 4238 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
4239 | - 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"); |
|
4239 | + 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"); |
|
4240 | 4240 | |
4241 | 4241 | // Read in the HTTP/1.1 or whatever. |
4242 | 4242 | $test = substr(fgets($fp, 11), -1); |
@@ -4832,7 +4832,7 @@ discard block |
||
4832 | 4832 | |
4833 | 4833 | uasort( |
4834 | 4834 | $context['css_files'], |
4835 | - function ($a, $b) |
|
4835 | + function($a, $b) |
|
4836 | 4836 | { |
4837 | 4837 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4838 | 4838 | } |
@@ -6166,7 +6166,7 @@ discard block |
||
6166 | 6166 | { |
6167 | 6167 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
6168 | 6168 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6169 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6169 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6170 | 6170 | if ($keep_alive) |
6171 | 6171 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
6172 | 6172 | else |
@@ -6176,7 +6176,7 @@ discard block |
||
6176 | 6176 | { |
6177 | 6177 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
6178 | 6178 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6179 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6179 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6180 | 6180 | if ($keep_alive) |
6181 | 6181 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
6182 | 6182 | else |
@@ -6425,13 +6425,13 @@ discard block |
||
6425 | 6425 | |
6426 | 6426 | // UTF-8 occurrences of MS special characters |
6427 | 6427 | $findchars_utf8 = array( |
6428 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
6429 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
6430 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
6431 | - "\xe2\x80\x98", // left single curly quote |
|
6432 | - "\xe2\x80\x99", // right single curly quote |
|
6433 | - "\xe2\x80\x9c", // left double curly quote |
|
6434 | - "\xe2\x80\x9d", // right double curly quote |
|
6428 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
6429 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
6430 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
6431 | + "\xe2\x80\x98", // left single curly quote |
|
6432 | + "\xe2\x80\x99", // right single curly quote |
|
6433 | + "\xe2\x80\x9c", // left double curly quote |
|
6434 | + "\xe2\x80\x9d", // right double curly quote |
|
6435 | 6435 | ); |
6436 | 6436 | |
6437 | 6437 | // windows 1252 / iso equivalents |
@@ -6447,13 +6447,13 @@ discard block |
||
6447 | 6447 | |
6448 | 6448 | // safe replacements |
6449 | 6449 | $replacechars = array( |
6450 | - ',', // ‚ |
|
6451 | - ',,', // „ |
|
6452 | - '...', // … |
|
6453 | - "'", // ‘ |
|
6454 | - "'", // ’ |
|
6455 | - '"', // “ |
|
6456 | - '"', // ” |
|
6450 | + ',', // ‚ |
|
6451 | + ',,', // „ |
|
6452 | + '...', // … |
|
6453 | + "'", // ‘ |
|
6454 | + "'", // ’ |
|
6455 | + '"', // “ |
|
6456 | + '"', // ” |
|
6457 | 6457 | ); |
6458 | 6458 | |
6459 | 6459 | if ($context['utf8']) |
@@ -6816,7 +6816,7 @@ discard block |
||
6816 | 6816 | // We don't want abbreviations like '+03' or '-11'. |
6817 | 6817 | $abbrs = array_filter( |
6818 | 6818 | $tzvalue['abbrs'], |
6819 | - function ($abbr) |
|
6819 | + function($abbr) |
|
6820 | 6820 | { |
6821 | 6821 | return !strspn($abbr, '+-'); |
6822 | 6822 | } |
@@ -7805,7 +7805,7 @@ discard block |
||
7805 | 7805 | EXISTS ( |
7806 | 7806 | SELECT bpv.id_board |
7807 | 7807 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7808 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7808 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7809 | 7809 | AND bpv.deny = 0 |
7810 | 7810 | AND bpv.id_board = b.id_board |
7811 | 7811 | )'; |
@@ -7815,7 +7815,7 @@ discard block |
||
7815 | 7815 | AND NOT EXISTS ( |
7816 | 7816 | SELECT bpv.id_board |
7817 | 7817 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7818 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7818 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7819 | 7819 | AND bpv.deny = 1 |
7820 | 7820 | AND bpv.id_board = b.id_board |
7821 | 7821 | )'; |
@@ -8228,8 +8228,8 @@ discard block |
||
8228 | 8228 | $i = 0; |
8229 | 8229 | while (empty($done)) |
8230 | 8230 | { |
8231 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
8232 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
8231 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
8232 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
8233 | 8233 | else |
8234 | 8234 | $done = true; |
8235 | 8235 | } |
@@ -8239,8 +8239,8 @@ discard block |
||
8239 | 8239 | $i = 0; |
8240 | 8240 | while (empty($done)) |
8241 | 8241 | { |
8242 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
8243 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
8242 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
8243 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
8244 | 8244 | else |
8245 | 8245 | $done = true; |
8246 | 8246 | } |
@@ -8421,7 +8421,7 @@ discard block |
||
8421 | 8421 | if (empty($stringSubject)) |
8422 | 8422 | return ''; |
8423 | 8423 | |
8424 | - $translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches); |
|
8424 | + $translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches); |
|
8425 | 8425 | $toFind = array(); |
8426 | 8426 | $replaceWith = array(); |
8427 | 8427 |
@@ -219,7 +219,7 @@ |
||
219 | 219 | |
220 | 220 | // Send a custom header if we have a custom message. |
221 | 221 | if (isset($_REQUEST['js']) || isset($_REQUEST['xml']) || isset($_RQEUEST['ajax'])) |
222 | - header('X-SMF-errormsg: ' . $error_message); |
|
222 | + header('X-SMF-errormsg: ' . $error_message); |
|
223 | 223 | |
224 | 224 | // If we have no theme stuff we can't have the language file... |
225 | 225 | if (empty($context['theme_loaded'])) |
@@ -2065,7 +2065,7 @@ discard block |
||
2065 | 2065 | new RecursiveIteratorIterator( |
2066 | 2066 | new RecursiveCallbackFilterIterator( |
2067 | 2067 | new RecursiveDirectoryIterator($dirname, FilesystemIterator::UNIX_PATHS), |
2068 | - function ($fileInfo, $currentFile, $iterator) |
|
2068 | + function($fileInfo, $currentFile, $iterator) |
|
2069 | 2069 | { |
2070 | 2070 | // Allow recursion |
2071 | 2071 | if ($iterator->hasChildren()) |
@@ -2112,7 +2112,7 @@ discard block |
||
2112 | 2112 | $hookParsedData = parse_integration_hook($hook, $rawFunc); |
2113 | 2113 | |
2114 | 2114 | // Handle hooks pointing outside the sources directory. |
2115 | - $absPath_clean = rtrim($hookParsedData['absPath'], '!'); |
|
2115 | + $absPath_clean = rtrim($hookParsedData['absPath'], '!'); |
|
2116 | 2116 | if ($absPath_clean != '' && !isset($files[$absPath_clean]) && file_exists($absPath_clean)) |
2117 | 2117 | $function_list += get_defined_functions_in_file($absPath_clean); |
2118 | 2118 |