@@ -722,12 +722,12 @@ |
||
722 | 722 | $where = ''; |
723 | 723 | $count_pk = 0; |
724 | 724 | |
725 | - If ($replace_support) |
|
725 | + if ($replace_support) |
|
726 | 726 | { |
727 | 727 | foreach ($columns as $columnName => $type) |
728 | 728 | { |
729 | 729 | //check pk fiel |
730 | - IF (in_array($columnName, $keys)) |
|
730 | + if (in_array($columnName, $keys)) |
|
731 | 731 | { |
732 | 732 | $key_str .= ($count_pk > 0 ? ',' : ''); |
733 | 733 | $key_str .= $columnName; |
@@ -498,7 +498,7 @@ |
||
498 | 498 | log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])])); |
499 | 499 | |
500 | 500 | $context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set) |
501 | - { |
|
501 | + { |
|
502 | 502 | return $v != $set; |
503 | 503 | }); |
504 | 504 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | // Set a list of common functions. |
99 | 99 | $ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);'; |
100 | 100 | $ent_check = empty($modSettings['disableEntityCheck']) ? function($string) |
101 | - { |
|
101 | + { |
|
102 | 102 | $string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string); |
103 | 103 | return $string; |
104 | 104 | } : function($string) |
@@ -2147,7 +2147,6 @@ discard block |
||
2147 | 2147 | loadLanguage('index+Modifications'); |
2148 | 2148 | $context['template_layers'] = array(); |
2149 | 2149 | } |
2150 | - |
|
2151 | 2150 | else |
2152 | 2151 | { |
2153 | 2152 | // Custom templates to load, or just default? |
@@ -2525,14 +2524,12 @@ discard block |
||
2525 | 2524 | $fileUrl = $settings['default_theme_url'] . '/css/' . $fileName; |
2526 | 2525 | $filePath = $settings['default_theme_dir'] . '/css/' . $fileName; |
2527 | 2526 | } |
2528 | - |
|
2529 | 2527 | else |
2530 | 2528 | { |
2531 | 2529 | $fileUrl = false; |
2532 | 2530 | $filePath = false; |
2533 | 2531 | } |
2534 | 2532 | } |
2535 | - |
|
2536 | 2533 | else |
2537 | 2534 | { |
2538 | 2535 | $fileUrl = $settings[$themeRef . '_url'] . '/css/' . $fileName; |
@@ -2639,14 +2636,12 @@ discard block |
||
2639 | 2636 | $fileUrl = $settings['default_theme_url'] . '/scripts/' . $fileName; |
2640 | 2637 | $filePath = $settings['default_theme_dir'] . '/scripts/' . $fileName; |
2641 | 2638 | } |
2642 | - |
|
2643 | 2639 | else |
2644 | 2640 | { |
2645 | 2641 | $fileUrl = false; |
2646 | 2642 | $filePath = false; |
2647 | 2643 | } |
2648 | 2644 | } |
2649 | - |
|
2650 | 2645 | else |
2651 | 2646 | { |
2652 | 2647 | $fileUrl = $settings[$themeRef . '_url'] . '/scripts/' . $fileName; |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | { |
392 | 392 | $val = 'CASE '; |
393 | 393 | foreach ($members as $k => $v) |
394 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
394 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
395 | 395 | $val = $val . ' END'; |
396 | 396 | $type = 'raw'; |
397 | 397 | } |
@@ -1407,7 +1407,7 @@ discard block |
||
1407 | 1407 | 'type' => 'unparsed_commas_content', |
1408 | 1408 | 'test' => '\d+,\d+\]', |
1409 | 1409 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1410 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1410 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1411 | 1411 | { |
1412 | 1412 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1413 | 1413 | if (empty($scheme)) |
@@ -1969,7 +1969,7 @@ discard block |
||
1969 | 1969 | $codes[] = array( |
1970 | 1970 | 'tag' => 'cowsay', |
1971 | 1971 | 'parameters' => array( |
1972 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
1972 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
1973 | 1973 | { |
1974 | 1974 | static $css_added; |
1975 | 1975 | |
@@ -1986,7 +1986,7 @@ discard block |
||
1986 | 1986 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
1987 | 1987 | }, |
1988 | 1988 | ), |
1989 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
1989 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
1990 | 1990 | { |
1991 | 1991 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
1992 | 1992 | }, |
@@ -5381,15 +5381,15 @@ discard block |
||
5381 | 5381 | |
5382 | 5382 | // UTF-8 occurences of MS special characters |
5383 | 5383 | $findchars_utf8 = array( |
5384 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5385 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5386 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5387 | - "\xe2\x80\x98", // left single curly quote |
|
5388 | - "\xe2\x80\x99", // right single curly quote |
|
5389 | - "\xe2\x80\x9c", // left double curly quote |
|
5390 | - "\xe2\x80\x9d", // right double curly quote |
|
5391 | - "\xe2\x80\x93", // en dash |
|
5392 | - "\xe2\x80\x94", // em dash |
|
5384 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5385 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5386 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5387 | + "\xe2\x80\x98", // left single curly quote |
|
5388 | + "\xe2\x80\x99", // right single curly quote |
|
5389 | + "\xe2\x80\x9c", // left double curly quote |
|
5390 | + "\xe2\x80\x9d", // right double curly quote |
|
5391 | + "\xe2\x80\x93", // en dash |
|
5392 | + "\xe2\x80\x94", // em dash |
|
5393 | 5393 | ); |
5394 | 5394 | |
5395 | 5395 | // windows 1252 / iso equivalents |
@@ -5407,15 +5407,15 @@ discard block |
||
5407 | 5407 | |
5408 | 5408 | // safe replacements |
5409 | 5409 | $replacechars = array( |
5410 | - ',', // ‚ |
|
5411 | - ',,', // „ |
|
5412 | - '...', // … |
|
5413 | - "'", // ‘ |
|
5414 | - "'", // ’ |
|
5415 | - '"', // “ |
|
5416 | - '"', // ” |
|
5417 | - '-', // – |
|
5418 | - '--', // — |
|
5410 | + ',', // ‚ |
|
5411 | + ',,', // „ |
|
5412 | + '...', // … |
|
5413 | + "'", // ‘ |
|
5414 | + "'", // ’ |
|
5415 | + '"', // “ |
|
5416 | + '"', // ” |
|
5417 | + '-', // – |
|
5418 | + '--', // — |
|
5419 | 5419 | ); |
5420 | 5420 | |
5421 | 5421 | if ($context['utf8']) |
@@ -6583,7 +6583,7 @@ discard block |
||
6583 | 6583 | EXISTS ( |
6584 | 6584 | SELECT bpv.id_board |
6585 | 6585 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6586 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
6586 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
6587 | 6587 | AND bpv.deny = 0 |
6588 | 6588 | AND bpv.id_board = b.id_board |
6589 | 6589 | )'; |
@@ -6593,7 +6593,7 @@ discard block |
||
6593 | 6593 | AND NOT EXISTS ( |
6594 | 6594 | SELECT bpv.id_board |
6595 | 6595 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6596 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
6596 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
6597 | 6597 | AND bpv.deny = 1 |
6598 | 6598 | AND bpv.id_board = b.id_board |
6599 | 6599 | )'; |
@@ -6853,8 +6853,8 @@ discard block |
||
6853 | 6853 | $i = 0; |
6854 | 6854 | while (empty($done)) |
6855 | 6855 | { |
6856 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
6857 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
6856 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
6857 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
6858 | 6858 | else |
6859 | 6859 | $done = true; |
6860 | 6860 | } |
@@ -6864,8 +6864,8 @@ discard block |
||
6864 | 6864 | $i = 0; |
6865 | 6865 | while (empty($done)) |
6866 | 6866 | { |
6867 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
6868 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
6867 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
6868 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
6869 | 6869 | else |
6870 | 6870 | $done = true; |
6871 | 6871 | } |
@@ -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 | |
@@ -1970,7 +1969,7 @@ discard block |
||
1970 | 1969 | 'tag' => 'cowsay', |
1971 | 1970 | 'parameters' => array( |
1972 | 1971 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
1973 | - { |
|
1972 | + { |
|
1974 | 1973 | static $css_added; |
1975 | 1974 | |
1976 | 1975 | if (empty($css_added)) |
@@ -1987,7 +1986,7 @@ discard block |
||
1987 | 1986 | }, |
1988 | 1987 | ), |
1989 | 1988 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
1990 | - { |
|
1989 | + { |
|
1991 | 1990 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
1992 | 1991 | }, |
1993 | 1992 | ), |
@@ -3087,7 +3086,7 @@ discard block |
||
3087 | 3086 | |
3088 | 3087 | // Replace away! |
3089 | 3088 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
3090 | - { |
|
3089 | + { |
|
3091 | 3090 | return $smileyPregReplacements[$matches[1]]; |
3092 | 3091 | }, $message); |
3093 | 3092 | } |
@@ -3873,7 +3872,6 @@ discard block |
||
3873 | 3872 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
3874 | 3873 | $minSeed = $js_file['options']['seed']; |
3875 | 3874 | } |
3876 | - |
|
3877 | 3875 | else |
3878 | 3876 | echo ' |
3879 | 3877 | <script src="', $js_file['fileUrl'], isset($file['options']['seed']) ? $file['options']['seed'] : '', '"', !empty($js_file['options']['async']) ? ' async' : '', !empty($js_file['options']['defer']) ? ' defer' : '', '></script>'; |
@@ -6026,7 +6024,6 @@ discard block |
||
6026 | 6024 | $isWritable = true; |
6027 | 6025 | break; |
6028 | 6026 | } |
6029 | - |
|
6030 | 6027 | else |
6031 | 6028 | @chmod($file, $val); |
6032 | 6029 | } |
@@ -420,7 +420,7 @@ |
||
420 | 420 | $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']); |
421 | 421 | } |
422 | 422 | } |
423 | - else |
|
423 | + else |
|
424 | 424 | foreach ($this_category as &$board) |
425 | 425 | { |
426 | 426 | if (!empty($moderators[$board['id']])) |
@@ -107,7 +107,7 @@ |
||
107 | 107 | </div>'; |
108 | 108 | |
109 | 109 | // Show the last post if there is one. |
110 | - if(!empty($board['last_post']['id'])) |
|
110 | + if (!empty($board['last_post']['id'])) |
|
111 | 111 | echo' |
112 | 112 | <div class="lastpost lpr_border"> |
113 | 113 | ', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), ' |
@@ -50,7 +50,7 @@ |
||
50 | 50 | </div>'; |
51 | 51 | |
52 | 52 | // Show the last post if there is one. |
53 | - if(!empty($board['last_post']['id'])) |
|
53 | + if (!empty($board['last_post']['id'])) |
|
54 | 54 | echo ' |
55 | 55 | <div class="lastpost lpr_border"> |
56 | 56 | ', function_exists('template_bi_' . $board['type'] . '_lastpost') ? call_user_func('template_bi_' . $board['type'] . '_lastpost', $board) : template_bi_board_lastpost($board), ' |
@@ -1826,7 +1826,7 @@ |
||
1826 | 1826 | if (!empty($excluded_groups)) |
1827 | 1827 | { |
1828 | 1828 | // Make sure this is an array of integers |
1829 | - $excluded_groups = array_filter((array) $excluded_groups, function ($v) |
|
1829 | + $excluded_groups = array_filter((array) $excluded_groups, function($v) |
|
1830 | 1830 | { |
1831 | 1831 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
1832 | 1832 | }); |
@@ -1827,7 +1827,7 @@ |
||
1827 | 1827 | { |
1828 | 1828 | // Make sure this is an array of integers |
1829 | 1829 | $excluded_groups = array_filter((array) $excluded_groups, function ($v) |
1830 | - { |
|
1830 | + { |
|
1831 | 1831 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
1832 | 1832 | }); |
1833 | 1833 |
@@ -975,7 +975,7 @@ |
||
975 | 975 | else |
976 | 976 | { |
977 | 977 | $return = array(); |
978 | - while($row = mysqli_fetch_assoc($request)) |
|
978 | + while ($row = mysqli_fetch_assoc($request)) |
|
979 | 979 | $return[] = $row; |
980 | 980 | } |
981 | 981 | return !empty($return) ? $return : array(); |