@@ -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'; |
@@ -871,11 +871,11 @@ discard block |
||
871 | 871 | // Anything that isn't a specification, punctuation mark, or whitespace. |
872 | 872 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
873 | 873 | // A series of punctuation marks (except %), possibly separated by whitespace. |
874 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
874 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
875 | 875 | // Unwanted trailing punctuation and whitespace. |
876 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
876 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
877 | 877 | // Unwanted opening punctuation and whitespace. |
878 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
878 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
879 | 879 | ), |
880 | 880 | array( |
881 | 881 | '', |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | { |
1179 | 1179 | $dates[$tzid . '_' . $timestamp]['results'][$format] = preg_replace_callback( |
1180 | 1180 | '/\xEE\x84\xA0([\d_]+)(\xEE\x84(?:[\xA1-\xAF]))/', |
1181 | - function ($matches) |
|
1181 | + function($matches) |
|
1182 | 1182 | { |
1183 | 1183 | switch ($matches[2]) |
1184 | 1184 | { |
@@ -1306,7 +1306,7 @@ discard block |
||
1306 | 1306 | elseif (!empty($context['character_set']) && is_callable('mb_decode_numericentity')) |
1307 | 1307 | { |
1308 | 1308 | // Get whatever the default replacement character is for this encoding. |
1309 | - $substitute = mb_decode_numericentity('�', array(0xFFFD,0xFFFD,0,0xFFFF), $context['character_set']); |
|
1309 | + $substitute = mb_decode_numericentity('�', array(0xFFFD, 0xFFFD, 0, 0xFFFF), $context['character_set']); |
|
1310 | 1310 | } |
1311 | 1311 | else |
1312 | 1312 | $substitute = '?'; |
@@ -1777,7 +1777,7 @@ discard block |
||
1777 | 1777 | $returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">'; |
1778 | 1778 | else |
1779 | 1779 | { |
1780 | - $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': ''; |
|
1780 | + $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
|
1781 | 1781 | $height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : ''; |
1782 | 1782 | $returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>'; |
1783 | 1783 | } |
@@ -1788,7 +1788,7 @@ discard block |
||
1788 | 1788 | $width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : ''; |
1789 | 1789 | $height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : ''; |
1790 | 1790 | |
1791 | - $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>' : ''); |
|
1791 | + $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>' : ''); |
|
1792 | 1792 | } |
1793 | 1793 | // Audio. |
1794 | 1794 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1796,7 +1796,7 @@ discard block |
||
1796 | 1796 | $width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;'; |
1797 | 1797 | $height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : ''; |
1798 | 1798 | |
1799 | - $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>'; |
|
1799 | + $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>'; |
|
1800 | 1800 | } |
1801 | 1801 | // Anything else. |
1802 | 1802 | else |
@@ -1965,7 +1965,7 @@ discard block |
||
1965 | 1965 | 'type' => 'unparsed_commas_content', |
1966 | 1966 | 'test' => '\d+,\d+\]', |
1967 | 1967 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1968 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1968 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1969 | 1969 | { |
1970 | 1970 | $data[0] = normalize_iri($data[0]); |
1971 | 1971 | |
@@ -2091,8 +2091,8 @@ discard block |
||
2091 | 2091 | else |
2092 | 2092 | $url = get_proxied_url($url); |
2093 | 2093 | |
2094 | - $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""'; |
|
2095 | - $title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : ''; |
|
2094 | + $alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""'; |
|
2095 | + $title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : ''; |
|
2096 | 2096 | |
2097 | 2097 | $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">'; |
2098 | 2098 | }, |
@@ -2523,12 +2523,12 @@ discard block |
||
2523 | 2523 | $codes[] = array( |
2524 | 2524 | 'tag' => 'cowsay', |
2525 | 2525 | 'parameters' => array( |
2526 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2526 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2527 | 2527 | { |
2528 | 2528 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2529 | 2529 | }, |
2530 | 2530 | ), |
2531 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2531 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2532 | 2532 | { |
2533 | 2533 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2534 | 2534 | }, |
@@ -4233,7 +4233,7 @@ discard block |
||
4233 | 4233 | if ($fp != false) |
4234 | 4234 | { |
4235 | 4235 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
4236 | - 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"); |
|
4236 | + 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"); |
|
4237 | 4237 | |
4238 | 4238 | // Read in the HTTP/1.1 or whatever. |
4239 | 4239 | $test = substr(fgets($fp, 11), -1); |
@@ -4829,7 +4829,7 @@ discard block |
||
4829 | 4829 | |
4830 | 4830 | uasort( |
4831 | 4831 | $context['css_files'], |
4832 | - function ($a, $b) |
|
4832 | + function($a, $b) |
|
4833 | 4833 | { |
4834 | 4834 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4835 | 4835 | } |
@@ -6130,7 +6130,7 @@ discard block |
||
6130 | 6130 | { |
6131 | 6131 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
6132 | 6132 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6133 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6133 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6134 | 6134 | if ($keep_alive) |
6135 | 6135 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
6136 | 6136 | else |
@@ -6140,7 +6140,7 @@ discard block |
||
6140 | 6140 | { |
6141 | 6141 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
6142 | 6142 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
6143 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
6143 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
6144 | 6144 | if ($keep_alive) |
6145 | 6145 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
6146 | 6146 | else |
@@ -6389,24 +6389,24 @@ discard block |
||
6389 | 6389 | |
6390 | 6390 | // UTF-8 occurences of MS special characters |
6391 | 6391 | $findchars_utf8 = array( |
6392 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
6393 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
6394 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
6395 | - "\xe2\x80\x98", // left single curly quote |
|
6396 | - "\xe2\x80\x99", // right single curly quote |
|
6397 | - "\xe2\x80\x9c", // left double curly quote |
|
6398 | - "\xe2\x80\x9d", // right double curly quote |
|
6392 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
6393 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
6394 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
6395 | + "\xe2\x80\x98", // left single curly quote |
|
6396 | + "\xe2\x80\x99", // right single curly quote |
|
6397 | + "\xe2\x80\x9c", // left double curly quote |
|
6398 | + "\xe2\x80\x9d", // right double curly quote |
|
6399 | 6399 | ); |
6400 | 6400 | |
6401 | 6401 | // safe replacements |
6402 | 6402 | $replacechars = array( |
6403 | - ',', // ‚ |
|
6404 | - ',,', // „ |
|
6405 | - '...', // … |
|
6406 | - "'", // ‘ |
|
6407 | - "'", // ’ |
|
6408 | - '"', // “ |
|
6409 | - '"', // ” |
|
6403 | + ',', // ‚ |
|
6404 | + ',,', // „ |
|
6405 | + '...', // … |
|
6406 | + "'", // ‘ |
|
6407 | + "'", // ’ |
|
6408 | + '"', // “ |
|
6409 | + '"', // ” |
|
6410 | 6410 | ); |
6411 | 6411 | |
6412 | 6412 | $string = str_replace($findchars_utf8, $replacechars, $string); |
@@ -6751,7 +6751,7 @@ discard block |
||
6751 | 6751 | // We don't want abbreviations like '+03' or '-11'. |
6752 | 6752 | $abbrs = array_filter( |
6753 | 6753 | $tzvalue['abbrs'], |
6754 | - function ($abbr) |
|
6754 | + function($abbr) |
|
6755 | 6755 | { |
6756 | 6756 | return !strspn($abbr, '+-'); |
6757 | 6757 | } |
@@ -7740,7 +7740,7 @@ discard block |
||
7740 | 7740 | EXISTS ( |
7741 | 7741 | SELECT bpv.id_board |
7742 | 7742 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7743 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7743 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7744 | 7744 | AND bpv.deny = 0 |
7745 | 7745 | AND bpv.id_board = b.id_board |
7746 | 7746 | )'; |
@@ -7750,7 +7750,7 @@ discard block |
||
7750 | 7750 | AND NOT EXISTS ( |
7751 | 7751 | SELECT bpv.id_board |
7752 | 7752 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7753 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7753 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7754 | 7754 | AND bpv.deny = 1 |
7755 | 7755 | AND bpv.id_board = b.id_board |
7756 | 7756 | )'; |
@@ -8157,8 +8157,8 @@ discard block |
||
8157 | 8157 | $i = 0; |
8158 | 8158 | while (empty($done)) |
8159 | 8159 | { |
8160 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
8161 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
8160 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
8161 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
8162 | 8162 | else |
8163 | 8163 | $done = true; |
8164 | 8164 | } |
@@ -8168,8 +8168,8 @@ discard block |
||
8168 | 8168 | $i = 0; |
8169 | 8169 | while (empty($done)) |
8170 | 8170 | { |
8171 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
8172 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
8171 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
8172 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
8173 | 8173 | else |
8174 | 8174 | $done = true; |
8175 | 8175 | } |
@@ -8347,7 +8347,7 @@ discard block |
||
8347 | 8347 | if (empty($stringSubject)) |
8348 | 8348 | return ''; |
8349 | 8349 | |
8350 | - $translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches); |
|
8350 | + $translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches); |
|
8351 | 8351 | $toFind = array(); |
8352 | 8352 | $replaceWith = array(); |
8353 | 8353 |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | // Filter out any redundant separators before we start the loop |
759 | 759 | $context['config_vars'] = array_filter( |
760 | 760 | $context['config_vars'], |
761 | - function ($v) use ($context) |
|
761 | + function($v) use ($context) |
|
762 | 762 | { |
763 | 763 | static $config_vars, $prev; |
764 | 764 | |
@@ -1659,7 +1659,7 @@ discard block |
||
1659 | 1659 | echo ' |
1660 | 1660 | <form action="' . $scripturl . '?action=admin;area=search" method="post" accept-charset="' . $context['character_set'] . '" class="admin_search"> |
1661 | 1661 | <span class="main_icons filter centericon"></span> |
1662 | - <input type="search" name="search_term" placeholder="', $txt['admin_search'], '"', isset($context['search_term']) ? ' value="' . $context['search_term'] . '"' : '','> |
|
1662 | + <input type="search" name="search_term" placeholder="', $txt['admin_search'], '"', isset($context['search_term']) ? ' value="' . $context['search_term'] . '"' : '', '> |
|
1663 | 1663 | <select name="search_type"> |
1664 | 1664 | <option value="internal"', (empty($context['admin_preferences']['sb']) || $context['admin_preferences']['sb'] == 'internal' ? ' selected' : ''), '>', $txt['admin_search_type_internal'], '</option> |
1665 | 1665 | <option value="member"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'member' ? ' selected' : ''), '>', $txt['admin_search_type_member'], '</option> |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | 'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'], |
854 | 854 | 'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1, |
855 | 855 | 'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0, |
856 | - 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0, |
|
856 | + 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0, |
|
857 | 857 | 'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0, |
858 | 858 | ), |
859 | 859 | 'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '', |
@@ -2539,7 +2539,7 @@ discard block |
||
2539 | 2539 | ); |
2540 | 2540 | |
2541 | 2541 | // Add the JQuery library to the list of files to load. |
2542 | - $jQueryUrls = array ('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/'. JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-'. JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-'. JQUERY_VERSION . '.min.js'); |
|
2542 | + $jQueryUrls = array('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/' . JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-' . JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-' . JQUERY_VERSION . '.min.js'); |
|
2543 | 2543 | |
2544 | 2544 | if (isset($modSettings['jquery_source']) && array_key_exists($modSettings['jquery_source'], $jQueryUrls)) |
2545 | 2545 | loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery'); |
@@ -2780,8 +2780,7 @@ discard block |
||
2780 | 2780 | $context['css_files_order'] = array(); |
2781 | 2781 | |
2782 | 2782 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2783 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2784 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2783 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2785 | 2784 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2786 | 2785 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2787 | 2786 | $params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true; |
@@ -2896,8 +2895,7 @@ discard block |
||
2896 | 2895 | global $settings, $context, $modSettings; |
2897 | 2896 | |
2898 | 2897 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2899 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2900 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2898 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2901 | 2899 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2902 | 2900 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2903 | 2901 | $params['async'] = isset($params['async']) ? $params['async'] : false; |
@@ -3687,8 +3685,7 @@ discard block |
||
3687 | 3685 | |
3688 | 3686 | // What accelerator we are going to try. |
3689 | 3687 | $cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT; |
3690 | - $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : |
|
3691 | - CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3688 | + $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3692 | 3689 | |
3693 | 3690 | // Do some basic tests. |
3694 | 3691 | if (class_exists($fully_qualified_class_name)) |
@@ -3992,7 +3989,7 @@ discard block |
||
3992 | 3989 | $auth_secret = hash_file('sha256', $boarddir . '/Settings.php'); |
3993 | 3990 | |
3994 | 3991 | // Set the last error to now, but only every 15 minutes. Don't need to flood the logs. |
3995 | - if (empty($db_last_error) || ($db_last_error + 60*15) <= time()) |
|
3992 | + if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time()) |
|
3996 | 3993 | { |
3997 | 3994 | updateDbLastError(time()); |
3998 | 3995 | loadLanguage('Errors'); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | // Cookies... |
478 | 478 | array('cookiename', $txt['cookie_name'], 'file', 'text', 20), |
479 | 479 | array('cookieTime', $txt['cookieTime'], 'db', 'select', array_filter(array_map( |
480 | - function ($str) use ($txt) |
|
480 | + function($str) use ($txt) |
|
481 | 481 | { |
482 | 482 | return isset($txt[$str]) ? $txt[$str] : ''; |
483 | 483 | }, |
@@ -1439,7 +1439,7 @@ discard block |
||
1439 | 1439 | // Obviously, we don't need null here. |
1440 | 1440 | $def['type'] = array_filter( |
1441 | 1441 | $def['type'], |
1442 | - function ($type) |
|
1442 | + function($type) |
|
1443 | 1443 | { |
1444 | 1444 | return $type !== 'NULL'; |
1445 | 1445 | } |
@@ -1765,7 +1765,7 @@ discard block |
||
1765 | 1765 | $cacheAPIdir = $sourcedir . '/Cache'; |
1766 | 1766 | |
1767 | 1767 | $loadedApis = array(); |
1768 | - $apis_dir = $cacheAPIdir .'/'. CacheApi::APIS_FOLDER; |
|
1768 | + $apis_dir = $cacheAPIdir . '/' . CacheApi::APIS_FOLDER; |
|
1769 | 1769 | |
1770 | 1770 | $api_classes = new GlobIterator($apis_dir . '/*.php', FilesystemIterator::NEW_CURRENT_AND_KEY); |
1771 | 1771 |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | ', sprintf($txt['welcome_to_forum'], $context['forum_name_html_safe']), ' |
274 | 274 | </li> |
275 | 275 | <li class="button_login"> |
276 | - <a href="', $scripturl, '?action=login" class="', $context['current_action'] == 'login' ? 'active' : 'open','" onclick="return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ', \'login\');"> |
|
276 | + <a href="', $scripturl, '?action=login" class="', $context['current_action'] == 'login' ? 'active' : 'open', '" onclick="return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ', \'login\');"> |
|
277 | 277 | <span class="main_icons login"></span> |
278 | 278 | <span class="textmenu">', $txt['login'], '</span> |
279 | 279 | </a> |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | if ($context['can_register']) |
283 | 283 | echo ' |
284 | 284 | <li class="button_signup"> |
285 | - <a href="', $scripturl, '?action=signup" class="', $context['current_action'] == 'signup' ? 'active' : 'open','"> |
|
285 | + <a href="', $scripturl, '?action=signup" class="', $context['current_action'] == 'signup' ? 'active' : 'open', '"> |
|
286 | 286 | <span class="main_icons regcenter"></span> |
287 | 287 | <span class="textmenu">', $txt['register'], '</span> |
288 | 288 | </a> |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | $value['id'] = $key; |
637 | 637 | |
638 | 638 | $button = ' |
639 | - <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>'.(!empty($value['icon']) ? '<span class="main_icons '.$value['icon'].'"></span>' : '').'' . $txt[$value['text']] . '</a>'; |
|
639 | + <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . (!empty($value['icon']) ? '<span class="main_icons ' . $value['icon'] . '"></span>' : '') . '' . $txt[$value['text']] . '</a>'; |
|
640 | 640 | |
641 | 641 | if (!empty($value['sub_buttons'])) |
642 | 642 | { |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | require_once($sourcedir . '/Subs-Compat.php'); |
83 | 83 | |
84 | 84 | // If $maintenance is set specifically to 2, then we're upgrading or something. |
85 | -if (!empty($maintenance) && 2 === $maintenance) |
|
85 | +if (!empty($maintenance) && 2 === $maintenance) |
|
86 | 86 | { |
87 | 87 | display_maintenance_message(); |
88 | 88 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * |
99 | 99 | * @param string $class The fully-qualified class name. |
100 | 100 | */ |
101 | -spl_autoload_register(function ($class) use ($sourcedir) |
|
101 | +spl_autoload_register(function($class) use ($sourcedir) |
|
102 | 102 | { |
103 | 103 | $classMap = array( |
104 | 104 | 'ReCaptcha\\' => 'ReCaptcha/', |