@@ -302,7 +302,6 @@ discard block |
||
| 302 | 302 | $condition = 'id_member IN ({array_int:members})'; |
| 303 | 303 | $parameters['members'] = $members; |
| 304 | 304 | } |
| 305 | - |
|
| 306 | 305 | elseif ($members === null) |
| 307 | 306 | $condition = '1=1'; |
| 308 | 307 | |
@@ -1739,7 +1738,7 @@ discard block |
||
| 1739 | 1738 | 'before' => '<span style="text-shadow: $1 $2">', |
| 1740 | 1739 | 'after' => '</span>', |
| 1741 | 1740 | 'validate' => function(&$tag, &$data, $disabled) |
| 1742 | - { |
|
| 1741 | + { |
|
| 1743 | 1742 | |
| 1744 | 1743 | if ($data[1] == 'top' || (is_numeric($data[1]) && $data[1] < 50)) |
| 1745 | 1744 | $data[1] = '0 -2px 1px'; |
@@ -1901,7 +1900,8 @@ discard block |
||
| 1901 | 1900 | { |
| 1902 | 1901 | if (isset($temp_bbc)) |
| 1903 | 1902 | $bbc_codes = $temp_bbc; |
| 1904 | - usort($codes, function ($a, $b) { |
|
| 1903 | + usort($codes, function ($a, $b) |
|
| 1904 | + { |
|
| 1905 | 1905 | return strcmp($a['tag'], $b['tag']); |
| 1906 | 1906 | }); |
| 1907 | 1907 | return $codes; |
@@ -2185,7 +2185,8 @@ discard block |
||
| 2185 | 2185 | )? |
| 2186 | 2186 | '; |
| 2187 | 2187 | |
| 2188 | - $data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function ($matches) { |
|
| 2188 | + $data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function ($matches) |
|
| 2189 | + { |
|
| 2189 | 2190 | $url = array_shift($matches); |
| 2190 | 2191 | |
| 2191 | 2192 | // If this isn't a clean URL, bail out |
@@ -2274,7 +2275,9 @@ discard block |
||
| 2274 | 2275 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
| 2275 | 2276 | |
| 2276 | 2277 | // A closing tag that doesn't match any open tags? Skip it. |
| 2277 | - if (!in_array($look_for, array_map(function($code){return $code['tag'];}, $open_tags))) |
|
| 2278 | + if (!in_array($look_for, array_map(function($code) |
|
| 2279 | + { |
|
| 2280 | +return $code['tag'];}, $open_tags))) |
|
| 2278 | 2281 | continue; |
| 2279 | 2282 | |
| 2280 | 2283 | $to_close = array(); |
@@ -3759,7 +3762,6 @@ discard block |
||
| 3759 | 3762 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
| 3760 | 3763 | $minSeed = $js_file['options']['seed']; |
| 3761 | 3764 | } |
| 3762 | - |
|
| 3763 | 3765 | else |
| 3764 | 3766 | echo ' |
| 3765 | 3767 | <script src="', $js_file['fileUrl'], '"', !empty($js_file['options']['async']) ? ' async' : '', !empty($js_file['options']['defer']) ? ' defer' : '', '></script>'; |
@@ -3909,7 +3911,9 @@ discard block |
||
| 3909 | 3911 | return $data; |
| 3910 | 3912 | |
| 3911 | 3913 | // Different pages include different files, so we use a hash to label the different combinations |
| 3912 | - $hash = md5(implode(' ', array_map(function($file) { return $file['filePath'] . (int) @filesize($file['filePath']) . (int) @filemtime($file['filePath']); }, $data))); |
|
| 3914 | + $hash = md5(implode(' ', array_map(function($file) |
|
| 3915 | + { |
|
| 3916 | +return $file['filePath'] . (int) @filesize($file['filePath']) . (int) @filemtime($file['filePath']); }, $data))); |
|
| 3913 | 3917 | |
| 3914 | 3918 | // Did we already do this? |
| 3915 | 3919 | list($toCache, $async, $defer) = array_pad((array) cache_get_data('minimized_' . $settings['theme_id'] . '_' . $type . '_' . $hash, 86400), 3, null); |
@@ -5914,7 +5918,6 @@ discard block |
||
| 5914 | 5918 | $isWritable = true; |
| 5915 | 5919 | break; |
| 5916 | 5920 | } |
| 5917 | - |
|
| 5918 | 5921 | else |
| 5919 | 5922 | @chmod($file, $val); |
| 5920 | 5923 | } |
@@ -6084,7 +6087,8 @@ discard block |
||
| 6084 | 6087 | if (!empty($tlds)) |
| 6085 | 6088 | { |
| 6086 | 6089 | // Clean $tlds and convert it to an array |
| 6087 | - $tlds = array_filter(explode("\n", strtolower($tlds)), function($line) { |
|
| 6090 | + $tlds = array_filter(explode("\n", strtolower($tlds)), function($line) |
|
| 6091 | + { |
|
| 6088 | 6092 | $line = trim($line); |
| 6089 | 6093 | if (empty($line) || strpos($line, '#') !== false || strpos($line, ' ') !== false) |
| 6090 | 6094 | return false; |
@@ -6095,7 +6099,9 @@ discard block |
||
| 6095 | 6099 | // Convert Punycode to Unicode |
| 6096 | 6100 | require_once($sourcedir . '/Class-Punycode.php'); |
| 6097 | 6101 | $Punycode = new Punycode(); |
| 6098 | - $tlds = array_map(function ($input) use ($Punycode) { return $Punycode->decode($input); }, $tlds); |
|
| 6102 | + $tlds = array_map(function ($input) use ($Punycode) |
|
| 6103 | + { |
|
| 6104 | +return $Punycode->decode($input); }, $tlds); |
|
| 6099 | 6105 | } |
| 6100 | 6106 | // Otherwise, use the 2012 list of gTLDs and ccTLDs for now and schedule a background update |
| 6101 | 6107 | else |
@@ -6262,7 +6268,8 @@ discard block |
||
| 6262 | 6268 | } |
| 6263 | 6269 | |
| 6264 | 6270 | // Sort by key length and then alphabetically |
| 6265 | - uksort($regex, function($k1, $k2) use (&$strlen) { |
|
| 6271 | + uksort($regex, function($k1, $k2) use (&$strlen) |
|
| 6272 | + { |
|
| 6266 | 6273 | $l1 = $strlen($k1); |
| 6267 | 6274 | $l2 = $strlen($k2); |
| 6268 | 6275 | |
@@ -6516,7 +6523,8 @@ discard block |
||
| 6516 | 6523 | function sanitize_iri($iri) |
| 6517 | 6524 | { |
| 6518 | 6525 | // Encode any non-ASCII characters (but not space or control characters of any sort) |
| 6519 | - $iri = preg_replace_callback('~[^\x00-\x7F\pZ\pC]~u', function ($matches) { |
|
| 6526 | + $iri = preg_replace_callback('~[^\x00-\x7F\pZ\pC]~u', function ($matches) |
|
| 6527 | + { |
|
| 6520 | 6528 | return rawurlencode($matches[0]); |
| 6521 | 6529 | }, $iri); |
| 6522 | 6530 | |
@@ -2932,7 +2932,7 @@ |
||
| 2932 | 2932 | } |
| 2933 | 2933 | |
| 2934 | 2934 | // Set proper extensions; do this post caching so cache doesn't become extension-specific |
| 2935 | - foreach($smileysto AS $ix=>$file) |
|
| 2935 | + foreach($smileysto as $ix=>$file) |
|
| 2936 | 2936 | // Need to use the default if user selection is disabled |
| 2937 | 2937 | if (empty($modSettings['smiley_sets_enable'])) |
| 2938 | 2938 | $smileysto[$ix] = $file . $context['user']['smiley_set_default_ext']; |
@@ -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']); |