@@ -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: |
@@ -2291,7 +2291,6 @@ |
||
2291 | 2291 | list ($hookData['class'], $hookData['method']) = explode('::', $modFunc); |
2292 | 2292 | $hookData['pureFunc'] = $hookData['method']; |
2293 | 2293 | } |
2294 | - |
|
2295 | 2294 | else |
2296 | 2295 | $hookData['pureFunc'] = $modFunc; |
2297 | 2296 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | // Set a list of common functions. |
79 | 79 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
80 | 80 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
81 | - { |
|
81 | + { |
|
82 | 82 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
83 | 83 | return $string; |
84 | 84 | } : function($string) |
@@ -2131,7 +2131,6 @@ discard block |
||
2131 | 2131 | loadLanguage('index+Modifications'); |
2132 | 2132 | $context['template_layers'] = array(); |
2133 | 2133 | } |
2134 | - |
|
2135 | 2134 | else |
2136 | 2135 | { |
2137 | 2136 | // Custom templates to load, or just default? |
@@ -2510,14 +2509,12 @@ discard block |
||
2510 | 2509 | $fileUrl = $settings['default_theme_url'] . '/css/' . $fileName . ($has_seed ? '' : $params['seed']); |
2511 | 2510 | $filePath = $settings['default_theme_dir'] . '/css/' . $fileName . ($has_seed ? '' : $params['seed']); |
2512 | 2511 | } |
2513 | - |
|
2514 | 2512 | else |
2515 | 2513 | { |
2516 | 2514 | $fileUrl = false; |
2517 | 2515 | $filePath = false; |
2518 | 2516 | } |
2519 | 2517 | } |
2520 | - |
|
2521 | 2518 | else |
2522 | 2519 | { |
2523 | 2520 | $fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName . ($has_seed ? '' : $params['seed']); |
@@ -2618,14 +2615,12 @@ discard block |
||
2618 | 2615 | $fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName . ($has_seed ? '' : $params['seed']); |
2619 | 2616 | $filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName . ($has_seed ? '' : $params['seed']); |
2620 | 2617 | } |
2621 | - |
|
2622 | 2618 | else |
2623 | 2619 | { |
2624 | 2620 | $fileUrl = false; |
2625 | 2621 | $filePath = false; |
2626 | 2622 | } |
2627 | 2623 | } |
2628 | - |
|
2629 | 2624 | else |
2630 | 2625 | { |
2631 | 2626 | $fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName . ($has_seed ? '' : $params['seed']); |
@@ -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'); |
@@ -756,7 +756,6 @@ |
||
756 | 756 | $groups[$row['id_group']]['num_members'] += $row['num_members']; |
757 | 757 | $smcFunc['db_free_result']($query); |
758 | 758 | } |
759 | - |
|
760 | 759 | else |
761 | 760 | { |
762 | 761 | $query = $smcFunc['db_query']('', ' |
@@ -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)) |
@@ -116,7 +116,8 @@ discard block |
||
116 | 116 | if (!$previewing && strpos($message, '[html]') !== false) |
117 | 117 | { |
118 | 118 | if (allowedTo('admin_forum')) |
119 | - $message = preg_replace_callback('~\[html\](.+?)\[/html\]~is', function($m) { |
|
119 | + $message = preg_replace_callback('~\[html\](.+?)\[/html\]~is', function($m) |
|
120 | + { |
|
120 | 121 | return '[html]' . strtr(un_htmlspecialchars($m[1]), array("\n" => ' ', ' ' => '  ', '[' => '[', ']' => ']')) . '[/html]'; |
121 | 122 | }, $message); |
122 | 123 | |
@@ -626,9 +627,10 @@ discard block |
||
626 | 627 | foreach ($to_array as $to) |
627 | 628 | { |
628 | 629 | set_error_handler(function($errno, $errstr, $errfile, $errline) |
629 | - { |
|
630 | + { |
|
630 | 631 | // error was suppressed with the @-operator |
631 | - if (0 === error_reporting()) { |
|
632 | + if (0 === error_reporting()) |
|
633 | + { |
|
632 | 634 | return false; |
633 | 635 | } |
634 | 636 | |
@@ -1241,7 +1243,6 @@ discard block |
||
1241 | 1243 | |
1242 | 1244 | return array($charset, $string, 'base64'); |
1243 | 1245 | } |
1244 | - |
|
1245 | 1246 | else |
1246 | 1247 | return array($charset, $string, '7bit'); |
1247 | 1248 | } |
@@ -425,7 +425,8 @@ discard block |
||
425 | 425 | if (!empty($day['events'])) |
426 | 426 | { |
427 | 427 | // Sort events by start time (all day events will be listed first) |
428 | - uasort($day['events'], function($a, $b) { |
|
428 | + uasort($day['events'], function($a, $b) |
|
429 | + { |
|
429 | 430 | if ($a['start_timestamp'] == $b['start_timestamp']) |
430 | 431 | return 0; |
431 | 432 | |
@@ -619,7 +620,8 @@ discard block |
||
619 | 620 | if (!empty($day['events'])) |
620 | 621 | { |
621 | 622 | // Sort events by start time (all day events will be listed first) |
622 | - uasort($day['events'], function($a, $b) { |
|
623 | + uasort($day['events'], function($a, $b) |
|
624 | + { |
|
623 | 625 | if ($a['start_timestamp'] == $b['start_timestamp']) |
624 | 626 | return 0; |
625 | 627 | return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1; |
@@ -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 |
@@ -2911,7 +2912,8 @@ discard block |
||
2911 | 2912 | $upcontext['step_progress'] = (int) (($upcontext['cur_table_num'] / $upcontext['table_count']) * 100); |
2912 | 2913 | |
2913 | 2914 | // Make sure we're ready & have painted the template before proceeding |
2914 | - if ($support_js && !isset($_GET['xml'])) { |
|
2915 | + if ($support_js && !isset($_GET['xml'])) |
|
2916 | + { |
|
2915 | 2917 | $_GET['substep'] = 0; |
2916 | 2918 | return false; |
2917 | 2919 | } |
@@ -2964,7 +2966,8 @@ discard block |
||
2964 | 2966 | list($charset) = explode('_', $collation); |
2965 | 2967 | |
2966 | 2968 | // Build structure of columns to operate on organized by charset; only operate on columns not yet utf8 |
2967 | - if ($charset != 'utf8') { |
|
2969 | + if ($charset != 'utf8') |
|
2970 | + { |
|
2968 | 2971 | if (!isset($table_charsets[$charset])) |
2969 | 2972 | $table_charsets[$charset] = array(); |
2970 | 2973 |