@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | $feed_meta = array( |
205 | 205 | 'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']), |
206 | 206 | 'desc' => sentence_list(array_map( |
207 | - function ($datatype) use ($txt) |
|
207 | + function($datatype) use ($txt) |
|
208 | 208 | { |
209 | 209 | return $txt[$datatype]; |
210 | 210 | }, |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | 'src' => 'src="' . $currentAttachment['href'] . '" onerror="$(\'.dlattach_' . $currentAttachment['id'] . '\').show(); $(\'.dlattach_' . $currentAttachment['id'] . '\').css({\'position\': \'absolute\'});"', |
727 | 727 | ), |
728 | 728 | $returnContext |
729 | - ) . $hidden_orig_link . '</span>' ; |
|
729 | + ) . $hidden_orig_link . '</span>'; |
|
730 | 730 | } |
731 | 731 | elseif (strpos($currentAttachment['mime_type'], 'video/') === 0) |
732 | 732 | { |
@@ -1716,7 +1716,7 @@ |
||
1716 | 1716 | { |
1717 | 1717 | usort( |
1718 | 1718 | $fallbacks[$tzid], |
1719 | - function ($a, $b) |
|
1719 | + function($a, $b) |
|
1720 | 1720 | { |
1721 | 1721 | return $a['ts'] > $b['ts']; |
1722 | 1722 | } |
@@ -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 | } |
@@ -2214,7 +2214,6 @@ |
||
2214 | 2214 | $hookData['pureFunc'] = $hookData['method']; |
2215 | 2215 | $hookData['call'] = $modFunc; |
2216 | 2216 | } |
2217 | - |
|
2218 | 2217 | else |
2219 | 2218 | $hookData['call'] = $hookData['pureFunc'] = $modFunc; |
2220 | 2219 |
@@ -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 |
@@ -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(); |
@@ -280,7 +280,6 @@ discard block |
||
280 | 280 | $condition = 'id_member IN ({array_int:members})'; |
281 | 281 | $parameters['members'] = $members; |
282 | 282 | } |
283 | - |
|
284 | 283 | elseif ($members === null) |
285 | 284 | $condition = '1=1'; |
286 | 285 | |
@@ -383,11 +382,9 @@ discard block |
||
383 | 382 | $val = $val . ' END'; |
384 | 383 | $type = 'raw'; |
385 | 384 | } |
386 | - |
|
387 | 385 | else |
388 | 386 | $val = alert_count($members, true); |
389 | 387 | } |
390 | - |
|
391 | 388 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
392 | 389 | { |
393 | 390 | $val = $var . ' ' . $val . ' 1'; |
@@ -2344,12 +2341,12 @@ discard block |
||
2344 | 2341 | 'tag' => 'cowsay', |
2345 | 2342 | 'parameters' => array( |
2346 | 2343 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2347 | - { |
|
2344 | + { |
|
2348 | 2345 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2349 | 2346 | }, |
2350 | 2347 | ), |
2351 | 2348 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2352 | - { |
|
2349 | + { |
|
2353 | 2350 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2354 | 2351 | }, |
2355 | 2352 | ), |
@@ -2711,7 +2708,8 @@ discard block |
||
2711 | 2708 | |
2712 | 2709 | foreach (array('path', 'query', 'fragment') as $part) |
2713 | 2710 | { |
2714 | - switch ($part) { |
|
2711 | + switch ($part) |
|
2712 | + { |
|
2715 | 2713 | case 'path': |
2716 | 2714 | $part_disallowed_chars = '\h\v<>' . $bracket_quote_chars . $excluded_trailing_chars . '/#&'; |
2717 | 2715 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -3048,7 +3046,9 @@ discard block |
||
3048 | 3046 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
3049 | 3047 | |
3050 | 3048 | // A closing tag that doesn't match any open tags? Skip it. |
3051 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
3049 | + if (!in_array($look_for, array_map(function($code) |
|
3050 | + { |
|
3051 | +return $code['tag']; }, $open_tags))) |
|
3052 | 3052 | continue; |
3053 | 3053 | |
3054 | 3054 | $to_close = array(); |
@@ -4588,7 +4588,6 @@ discard block |
||
4588 | 4588 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4589 | 4589 | $minSeed = $js_file['options']['seed']; |
4590 | 4590 | } |
4591 | - |
|
4592 | 4591 | else |
4593 | 4592 | { |
4594 | 4593 | echo ' |
@@ -6513,7 +6512,8 @@ discard block |
||
6513 | 6512 | $zones[$tzkey]['tzid'] = $tzid; |
6514 | 6513 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
6515 | 6514 | |
6516 | - foreach ($tzinfo as $transition) { |
|
6515 | + foreach ($tzinfo as $transition) |
|
6516 | + { |
|
6517 | 6517 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
6518 | 6518 | } |
6519 | 6519 | |
@@ -7035,7 +7035,6 @@ discard block |
||
7035 | 7035 | $isWritable = true; |
7036 | 7036 | break; |
7037 | 7037 | } |
7038 | - |
|
7039 | 7038 | else |
7040 | 7039 | @chmod($file, $val); |
7041 | 7040 | } |
@@ -8125,7 +8124,8 @@ discard block |
||
8125 | 8124 | $replaceWith = array(); |
8126 | 8125 | |
8127 | 8126 | if (!empty($matches[1])) |
8128 | - foreach ($matches[1] as $token) { |
|
8127 | + foreach ($matches[1] as $token) |
|
8128 | + { |
|
8129 | 8129 | $toFind[] = '{' . $token . '}'; |
8130 | 8130 | $replaceWith[] = isset($txt[$token]) ? $txt[$token] : $token; |
8131 | 8131 | } |
@@ -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 | } |
@@ -6152,7 +6152,7 @@ discard block |
||
6152 | 6152 | { |
6153 | 6153 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
6154 | 6154 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6155 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6155 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6156 | 6156 | if ($keep_alive) |
6157 | 6157 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
6158 | 6158 | else |
@@ -6162,7 +6162,7 @@ discard block |
||
6162 | 6162 | { |
6163 | 6163 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
6164 | 6164 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6165 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6165 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6166 | 6166 | if ($keep_alive) |
6167 | 6167 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
6168 | 6168 | else |
@@ -6411,13 +6411,13 @@ discard block |
||
6411 | 6411 | |
6412 | 6412 | // UTF-8 occurences of MS special characters |
6413 | 6413 | $findchars_utf8 = array( |
6414 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
6415 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
6416 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
6417 | - "\xe2\x80\x98", // left single curly quote |
|
6418 | - "\xe2\x80\x99", // right single curly quote |
|
6419 | - "\xe2\x80\x9c", // left double curly quote |
|
6420 | - "\xe2\x80\x9d", // right double curly quote |
|
6414 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
6415 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
6416 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
6417 | + "\xe2\x80\x98", // left single curly quote |
|
6418 | + "\xe2\x80\x99", // right single curly quote |
|
6419 | + "\xe2\x80\x9c", // left double curly quote |
|
6420 | + "\xe2\x80\x9d", // right double curly quote |
|
6421 | 6421 | ); |
6422 | 6422 | |
6423 | 6423 | // windows 1252 / iso equivalents |
@@ -6433,13 +6433,13 @@ discard block |
||
6433 | 6433 | |
6434 | 6434 | // safe replacements |
6435 | 6435 | $replacechars = array( |
6436 | - ',', // ‚ |
|
6437 | - ',,', // „ |
|
6438 | - '...', // … |
|
6439 | - "'", // ‘ |
|
6440 | - "'", // ’ |
|
6441 | - '"', // “ |
|
6442 | - '"', // ” |
|
6436 | + ',', // ‚ |
|
6437 | + ',,', // „ |
|
6438 | + '...', // … |
|
6439 | + "'", // ‘ |
|
6440 | + "'", // ’ |
|
6441 | + '"', // “ |
|
6442 | + '"', // ” |
|
6443 | 6443 | ); |
6444 | 6444 | |
6445 | 6445 | if ($context['utf8']) |
@@ -6802,7 +6802,7 @@ discard block |
||
6802 | 6802 | // We don't want abbreviations like '+03' or '-11'. |
6803 | 6803 | $abbrs = array_filter( |
6804 | 6804 | $tzvalue['abbrs'], |
6805 | - function ($abbr) |
|
6805 | + function($abbr) |
|
6806 | 6806 | { |
6807 | 6807 | return !strspn($abbr, '+-'); |
6808 | 6808 | } |
@@ -7791,7 +7791,7 @@ discard block |
||
7791 | 7791 | EXISTS ( |
7792 | 7792 | SELECT bpv.id_board |
7793 | 7793 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7794 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7794 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7795 | 7795 | AND bpv.deny = 0 |
7796 | 7796 | AND bpv.id_board = b.id_board |
7797 | 7797 | )'; |
@@ -7801,7 +7801,7 @@ discard block |
||
7801 | 7801 | AND NOT EXISTS ( |
7802 | 7802 | SELECT bpv.id_board |
7803 | 7803 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7804 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7804 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7805 | 7805 | AND bpv.deny = 1 |
7806 | 7806 | AND bpv.id_board = b.id_board |
7807 | 7807 | )'; |
@@ -8214,8 +8214,8 @@ discard block |
||
8214 | 8214 | $i = 0; |
8215 | 8215 | while (empty($done)) |
8216 | 8216 | { |
8217 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
8218 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
8217 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
8218 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
8219 | 8219 | else |
8220 | 8220 | $done = true; |
8221 | 8221 | } |
@@ -8225,8 +8225,8 @@ discard block |
||
8225 | 8225 | $i = 0; |
8226 | 8226 | while (empty($done)) |
8227 | 8227 | { |
8228 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
8229 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
8228 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
8229 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
8230 | 8230 | else |
8231 | 8231 | $done = true; |
8232 | 8232 | } |
@@ -8407,7 +8407,7 @@ discard block |
||
8407 | 8407 | if (empty($stringSubject)) |
8408 | 8408 | return ''; |
8409 | 8409 | |
8410 | - $translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches); |
|
8410 | + $translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches); |
|
8411 | 8411 | $toFind = array(); |
8412 | 8412 | $replaceWith = array(); |
8413 | 8413 |
@@ -1107,7 +1107,7 @@ |
||
1107 | 1107 | 'left_join' => array(), |
1108 | 1108 | 'where' => array( |
1109 | 1109 | 't.id_redirect_topic = {int:not_redirected}', |
1110 | - 't.redirect_expires = {int:never_expires}', |
|
1110 | + 't.redirect_expires = {int:never_expires}', |
|
1111 | 1111 | ), |
1112 | 1112 | ); |
1113 | 1113 |
@@ -156,7 +156,6 @@ discard block |
||
156 | 156 | $diff = $cur_profile['date_registered'] - strtotime(smf_strftime('%Y-%m-%d', $cur_profile['date_registered'])); |
157 | 157 | $value = $value + $diff; |
158 | 158 | } |
159 | - |
|
160 | 159 | else |
161 | 160 | $value = $cur_profile['date_registered']; |
162 | 161 | |
@@ -507,7 +506,7 @@ discard block |
||
507 | 506 | log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])])); |
508 | 507 | |
509 | 508 | $context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set) |
510 | - { |
|
509 | + { |
|
511 | 510 | return $v != $set; |
512 | 511 | }); |
513 | 512 | } |
@@ -3518,7 +3517,6 @@ discard block |
||
3518 | 3517 | } |
3519 | 3518 | } |
3520 | 3519 | } |
3521 | - |
|
3522 | 3520 | elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar) |
3523 | 3521 | { |
3524 | 3522 | if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar) |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return false; |
93 | 93 | }, |
94 | 94 | 'utf8_version' => '8.0', |
95 | - 'utf8_version_check' => function (){ |
|
95 | + 'utf8_version_check' => function() { |
|
96 | 96 | global $db_connection; |
97 | 97 | $request = pg_query($db_connection, 'SELECT version()'); |
98 | 98 | list ($version) = pg_fetch_row($request); |
@@ -987,7 +987,7 @@ discard block |
||
987 | 987 | $incontext['continue'] = 1; |
988 | 988 | |
989 | 989 | // Check Postgres setting |
990 | - if ( $db_type === 'postgresql') |
|
990 | + if ($db_type === 'postgresql') |
|
991 | 991 | { |
992 | 992 | load_database(); |
993 | 993 | $result = $smcFunc['db_query']('', ' |
@@ -40,7 +40,8 @@ discard block |
||
40 | 40 | 'mysql' => array( |
41 | 41 | 'name' => 'MySQL', |
42 | 42 | 'version' => '5.6.0', |
43 | - 'version_check' => function() { |
|
43 | + 'version_check' => function() |
|
44 | + { |
|
44 | 45 | global $db_connection; |
45 | 46 | if (!function_exists('mysqli_fetch_row')) |
46 | 47 | return false; |
@@ -56,7 +57,8 @@ discard block |
||
56 | 57 | return true; |
57 | 58 | }, |
58 | 59 | 'utf8_version' => '5.0.22', |
59 | - 'utf8_version_check' => function() { |
|
60 | + 'utf8_version_check' => function() |
|
61 | + { |
|
60 | 62 | global $db_connection; |
61 | 63 | return mysqli_get_server_info($db_connection); |
62 | 64 | }, |
@@ -70,7 +72,8 @@ discard block |
||
70 | 72 | 'postgresql' => array( |
71 | 73 | 'name' => 'PostgreSQL', |
72 | 74 | 'version' => '9.6', |
73 | - 'version_check' => function() { |
|
75 | + 'version_check' => function() |
|
76 | + { |
|
74 | 77 | global $db_connection; |
75 | 78 | $request = pg_query($db_connection, 'SELECT version()'); |
76 | 79 | list ($version) = pg_fetch_row($request); |
@@ -92,7 +95,8 @@ discard block |
||
92 | 95 | return false; |
93 | 96 | }, |
94 | 97 | 'utf8_version' => '8.0', |
95 | - 'utf8_version_check' => function (){ |
|
98 | + 'utf8_version_check' => function () |
|
99 | + { |
|
96 | 100 | global $db_connection; |
97 | 101 | $request = pg_query($db_connection, 'SELECT version()'); |
98 | 102 | list ($version) = pg_fetch_row($request); |
@@ -1001,7 +1005,7 @@ discard block |
||
1001 | 1005 | { |
1002 | 1006 | $row = $smcFunc['db_fetch_assoc']($result); |
1003 | 1007 | if ($row['standard_conforming_strings'] !== 'on') |
1004 | - { |
|
1008 | + { |
|
1005 | 1009 | $incontext['continue'] = 0; |
1006 | 1010 | $incontext['error'] = $txt['error_pg_scs']; |
1007 | 1011 | } |