@@ -181,15 +181,15 @@ discard block |
||
181 | 181 | $class_name = $this->getImplementationClassKeyName(); |
182 | 182 | $class_name_txt_key = strtolower($class_name); |
183 | 183 | |
184 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
184 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
185 | 185 | $config_vars[] = array( |
186 | 186 | self::CLASS_KEY, |
187 | - $txt['cache_'. $class_name_txt_key .'_servers'], |
|
187 | + $txt['cache_' . $class_name_txt_key . '_servers'], |
|
188 | 188 | 'file', |
189 | 189 | 'text', |
190 | 190 | 0, |
191 | - 'cache_'. $class_name_txt_key, |
|
192 | - 'subtext' => $txt['cache_'. $class_name_txt_key .'_servers_subtext']); |
|
191 | + 'cache_' . $class_name_txt_key, |
|
192 | + 'subtext' => $txt['cache_' . $class_name_txt_key . '_servers_subtext']); |
|
193 | 193 | |
194 | 194 | if (!isset($context['settings_post_javascript'])) |
195 | 195 | $context['settings_post_javascript'] = ''; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $context['settings_post_javascript'] .= ' |
198 | 198 | $("#cache_accelerator").change(function (e) { |
199 | 199 | var cache_type = e.currentTarget.value; |
200 | - $("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "'. $class_name .'"); |
|
200 | + $("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "' . $class_name . '"); |
|
201 | 201 | });'; |
202 | 202 | } |
203 | 203 |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $class_name = $this->getImplementationClassKeyName(); |
185 | 185 | $class_name_txt_key = strtolower($class_name); |
186 | 186 | |
187 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
187 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
188 | 188 | $config_vars[] = array('cachedir', $txt['cachedir'], 'file', 'text', 36, 'cache_cachedir'); |
189 | 189 | |
190 | 190 | if (!isset($context['settings_post_javascript'])) |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $context['settings_post_javascript'] .= ' |
194 | 194 | $("#cache_accelerator").change(function (e) { |
195 | 195 | var cache_type = e.currentTarget.value; |
196 | - $("#cachedir").prop("disabled", cache_type != "'. $class_name .'"); |
|
196 | + $("#cachedir").prop("disabled", cache_type != "'. $class_name . '"); |
|
197 | 197 | });'; |
198 | 198 | } |
199 | 199 |
@@ -181,15 +181,15 @@ discard block |
||
181 | 181 | $class_name = $this->getImplementationClassKeyName(); |
182 | 182 | $class_name_txt_key = strtolower($class_name); |
183 | 183 | |
184 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
184 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
185 | 185 | $config_vars[] = array( |
186 | 186 | self::CLASS_KEY, |
187 | - $txt['cache_'. $class_name_txt_key .'_servers'], |
|
187 | + $txt['cache_' . $class_name_txt_key . '_servers'], |
|
188 | 188 | 'file', |
189 | 189 | 'text', |
190 | 190 | 0, |
191 | - 'cache_'. $class_name_txt_key, |
|
192 | - 'subtext' => $txt['cache_'. $class_name_txt_key .'_servers_subtext']); |
|
191 | + 'cache_' . $class_name_txt_key, |
|
192 | + 'subtext' => $txt['cache_' . $class_name_txt_key . '_servers_subtext']); |
|
193 | 193 | |
194 | 194 | if (!isset($context['settings_post_javascript'])) |
195 | 195 | $context['settings_post_javascript'] = ''; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $context['settings_post_javascript'] .= ' |
198 | 198 | $("#cache_accelerator").change(function (e) { |
199 | 199 | var cache_type = e.currentTarget.value; |
200 | - $("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "'. $class_name .'"); |
|
200 | + $("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "' . $class_name . '"); |
|
201 | 201 | });'; |
202 | 202 | } |
203 | 203 |
@@ -131,14 +131,14 @@ discard block |
||
131 | 131 | $class_name = $this->getImplementationClassKeyName(); |
132 | 132 | $class_name_txt_key = strtolower($class_name); |
133 | 133 | |
134 | - $config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings']; |
|
134 | + $config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings']; |
|
135 | 135 | $config_vars[] = array( |
136 | - 'cachedir_'. $class_name_txt_key, |
|
137 | - $txt['cachedir_'. $class_name_txt_key], |
|
136 | + 'cachedir_' . $class_name_txt_key, |
|
137 | + $txt['cachedir_' . $class_name_txt_key], |
|
138 | 138 | 'file', |
139 | 139 | 'text', |
140 | 140 | 36, |
141 | - 'cache_'. $class_name_txt_key .'_cachedir'); |
|
141 | + 'cache_' . $class_name_txt_key . '_cachedir'); |
|
142 | 142 | |
143 | 143 | if (!isset($context['settings_post_javascript'])) |
144 | 144 | $context['settings_post_javascript'] = ''; |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $context['settings_post_javascript'] .= ' |
147 | 147 | $("#cache_accelerator").change(function (e) { |
148 | 148 | var cache_type = e.currentTarget.value; |
149 | - $("#cachedir_'. $class_name_txt_key .'").prop("disabled", cache_type != "'. $class_name .'"); |
|
149 | + $("#cachedir_'. $class_name_txt_key . '").prop("disabled", cache_type != "' . $class_name . '"); |
|
150 | 150 | });'; |
151 | 151 | } |
152 | 152 |
@@ -1721,7 +1721,7 @@ discard block |
||
1721 | 1721 | { |
1722 | 1722 | // Avoid double separators and empty titled sections |
1723 | 1723 | $empty_section = true; |
1724 | - for ($j=$i+1; $j < count($context['theme_options']); $j++) |
|
1724 | + for ($j = $i + 1; $j < count($context['theme_options']); $j++) |
|
1725 | 1725 | { |
1726 | 1726 | // Found another separator, so we're done |
1727 | 1727 | if (!is_array($context['theme_options'][$j])) |
@@ -2700,8 +2700,7 @@ discard block |
||
2700 | 2700 | foreach ($context['post_errors'] as $error) |
2701 | 2701 | { |
2702 | 2702 | $text_key_error = $error == 'password_short' ? |
2703 | - sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : |
|
2704 | - $txt['profile_error_' . $error]; |
|
2703 | + sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : $txt['profile_error_' . $error]; |
|
2705 | 2704 | |
2706 | 2705 | echo ' |
2707 | 2706 | <li>', isset($txt['profile_error_' . $error]) ? $text_key_error : $error, '</li>'; |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | display_db_error(); |
76 | 76 | |
77 | 77 | // We need to escape ' and \ |
78 | - $db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd); |
|
78 | + $db_passwd = str_replace(array('\\', '\''), array('\\\\', '\\\''), $db_passwd); |
|
79 | 79 | |
80 | 80 | // Since pg_connect doesn't feed error info to pg_last_error, we have to catch issues with a try/catch. |
81 | 81 | set_error_handler(function($errno, $errstr) { |
82 | - throw new ErrorException($errstr, $errno);}); |
|
82 | + throw new ErrorException($errstr, $errno); }); |
|
83 | 83 | try |
84 | 84 | { |
85 | 85 | if (!empty($db_options['persist'])) |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | if (filter_var($error_array[2], FILTER_VALIDATE_IP) === false) |
939 | 939 | $error_array[2] = null; |
940 | 940 | |
941 | - if(empty($db_persist)) |
|
941 | + if (empty($db_persist)) |
|
942 | 942 | { // without pooling |
943 | 943 | if (empty($pg_error_data_prep)) |
944 | 944 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | { |
378 | 378 | $val = 'CASE '; |
379 | 379 | foreach ($members as $k => $v) |
380 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
380 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
381 | 381 | |
382 | 382 | $val = $val . ' END'; |
383 | 383 | $type = 'raw'; |
@@ -1039,11 +1039,11 @@ discard block |
||
1039 | 1039 | // Anything that isn't a specification, punctuation mark, or whitespace. |
1040 | 1040 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
1041 | 1041 | // A series of punctuation marks (except %), possibly separated by whitespace. |
1042 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1042 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1043 | 1043 | // Unwanted trailing punctuation and whitespace. |
1044 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1044 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1045 | 1045 | // Unwanted opening punctuation and whitespace. |
1046 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1046 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1047 | 1047 | ), |
1048 | 1048 | array( |
1049 | 1049 | '', |
@@ -1155,7 +1155,7 @@ discard block |
||
1155 | 1155 | $dt_user = new DateTime('@' . $timestamp); |
1156 | 1156 | $temp_offset = $dtz_user->getOffset($dt_user); |
1157 | 1157 | if ($temp_offset !== false) |
1158 | - $user_offset = $temp_offset/3600; |
|
1158 | + $user_offset = $temp_offset / 3600; |
|
1159 | 1159 | } |
1160 | 1160 | } |
1161 | 1161 | } |
@@ -1486,7 +1486,7 @@ discard block |
||
1486 | 1486 | $width = !empty($width) ? ' width="' . $width . '"' : ''; |
1487 | 1487 | $height = !empty($height) ? ' height="' . $height . '"' : ''; |
1488 | 1488 | |
1489 | - $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>' : ''); |
|
1489 | + $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>' : ''); |
|
1490 | 1490 | } |
1491 | 1491 | // Audio. |
1492 | 1492 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1494,7 +1494,7 @@ discard block |
||
1494 | 1494 | $width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
1495 | 1495 | $height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
1496 | 1496 | |
1497 | - $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>'; |
|
1497 | + $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>'; |
|
1498 | 1498 | } |
1499 | 1499 | // Anything else. |
1500 | 1500 | else |
@@ -1663,7 +1663,7 @@ discard block |
||
1663 | 1663 | 'type' => 'unparsed_commas_content', |
1664 | 1664 | 'test' => '\d+,\d+\]', |
1665 | 1665 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1666 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1666 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1667 | 1667 | { |
1668 | 1668 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1669 | 1669 | if (empty($scheme)) |
@@ -2201,12 +2201,12 @@ discard block |
||
2201 | 2201 | $codes[] = array( |
2202 | 2202 | 'tag' => 'cowsay', |
2203 | 2203 | 'parameters' => array( |
2204 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2204 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2205 | 2205 | { |
2206 | 2206 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2207 | 2207 | }, |
2208 | 2208 | ), |
2209 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2209 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2210 | 2210 | { |
2211 | 2211 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2212 | 2212 | }, |
@@ -3578,7 +3578,7 @@ discard block |
||
3578 | 3578 | if ($fp != false) |
3579 | 3579 | { |
3580 | 3580 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3581 | - 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"); |
|
3581 | + 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"); |
|
3582 | 3582 | |
3583 | 3583 | // Read in the HTTP/1.1 or whatever. |
3584 | 3584 | $test = substr(fgets($fp, 11), -1); |
@@ -4182,7 +4182,7 @@ discard block |
||
4182 | 4182 | $toMinify = array(); |
4183 | 4183 | $normal = array(); |
4184 | 4184 | |
4185 | - uasort($context['css_files'], function ($a, $b) |
|
4185 | + uasort($context['css_files'], function($a, $b) |
|
4186 | 4186 | { |
4187 | 4187 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4188 | 4188 | }); |
@@ -5478,7 +5478,7 @@ discard block |
||
5478 | 5478 | { |
5479 | 5479 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5480 | 5480 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5481 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5481 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5482 | 5482 | if ($keep_alive) |
5483 | 5483 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5484 | 5484 | else |
@@ -5488,7 +5488,7 @@ discard block |
||
5488 | 5488 | { |
5489 | 5489 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5490 | 5490 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5491 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5491 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5492 | 5492 | if ($keep_alive) |
5493 | 5493 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5494 | 5494 | else |
@@ -5736,13 +5736,13 @@ discard block |
||
5736 | 5736 | |
5737 | 5737 | // UTF-8 occurences of MS special characters |
5738 | 5738 | $findchars_utf8 = array( |
5739 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5740 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5741 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5742 | - "\xe2\x80\x98", // left single curly quote |
|
5743 | - "\xe2\x80\x99", // right single curly quote |
|
5744 | - "\xe2\x80\x9c", // left double curly quote |
|
5745 | - "\xe2\x80\x9d", // right double curly quote |
|
5739 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5740 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5741 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5742 | + "\xe2\x80\x98", // left single curly quote |
|
5743 | + "\xe2\x80\x99", // right single curly quote |
|
5744 | + "\xe2\x80\x9c", // left double curly quote |
|
5745 | + "\xe2\x80\x9d", // right double curly quote |
|
5746 | 5746 | ); |
5747 | 5747 | |
5748 | 5748 | // windows 1252 / iso equivalents |
@@ -5758,13 +5758,13 @@ discard block |
||
5758 | 5758 | |
5759 | 5759 | // safe replacements |
5760 | 5760 | $replacechars = array( |
5761 | - ',', // ‚ |
|
5762 | - ',,', // „ |
|
5763 | - '...', // … |
|
5764 | - "'", // ‘ |
|
5765 | - "'", // ’ |
|
5766 | - '"', // “ |
|
5767 | - '"', // ” |
|
5761 | + ',', // ‚ |
|
5762 | + ',,', // „ |
|
5763 | + '...', // … |
|
5764 | + "'", // ‘ |
|
5765 | + "'", // ’ |
|
5766 | + '"', // “ |
|
5767 | + '"', // ” |
|
5768 | 5768 | ); |
5769 | 5769 | |
5770 | 5770 | if ($context['utf8']) |
@@ -6949,7 +6949,7 @@ discard block |
||
6949 | 6949 | EXISTS ( |
6950 | 6950 | SELECT bpv.id_board |
6951 | 6951 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6952 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
6952 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
6953 | 6953 | AND bpv.deny = 0 |
6954 | 6954 | AND bpv.id_board = b.id_board |
6955 | 6955 | )'; |
@@ -6959,7 +6959,7 @@ discard block |
||
6959 | 6959 | AND NOT EXISTS ( |
6960 | 6960 | SELECT bpv.id_board |
6961 | 6961 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6962 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
6962 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
6963 | 6963 | AND bpv.deny = 1 |
6964 | 6964 | AND bpv.id_board = b.id_board |
6965 | 6965 | )'; |
@@ -7230,8 +7230,8 @@ discard block |
||
7230 | 7230 | $i = 0; |
7231 | 7231 | while (empty($done)) |
7232 | 7232 | { |
7233 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7234 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7233 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7234 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7235 | 7235 | else |
7236 | 7236 | $done = true; |
7237 | 7237 | } |
@@ -7241,8 +7241,8 @@ discard block |
||
7241 | 7241 | $i = 0; |
7242 | 7242 | while (empty($done)) |
7243 | 7243 | { |
7244 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7245 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7244 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7245 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7246 | 7246 | else |
7247 | 7247 | $done = true; |
7248 | 7248 | } |
@@ -2717,8 +2717,7 @@ discard block |
||
2717 | 2717 | $context['css_files_order'] = array(); |
2718 | 2718 | |
2719 | 2719 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2720 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2721 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2720 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2722 | 2721 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2723 | 2722 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2724 | 2723 | $params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true; |
@@ -2832,8 +2831,7 @@ discard block |
||
2832 | 2831 | global $settings, $context, $modSettings; |
2833 | 2832 | |
2834 | 2833 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2835 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2836 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2834 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2837 | 2835 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2838 | 2836 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2839 | 2837 | $params['async'] = isset($params['async']) ? $params['async'] : false; |
@@ -3573,10 +3571,10 @@ discard block |
||
3573 | 3571 | $cacheAPI = false; |
3574 | 3572 | |
3575 | 3573 | // Autoload hasn't been called yet :/ |
3576 | - require_once($cacheAPIdir .'/CacheApi.php'); |
|
3577 | - require_once($cacheAPIdir .'/CacheApiInterface.php'); |
|
3574 | + require_once($cacheAPIdir . '/CacheApi.php'); |
|
3575 | + require_once($cacheAPIdir . '/CacheApiInterface.php'); |
|
3578 | 3576 | |
3579 | - $apis_dir = $cacheAPIdir .'/'. CacheApi::APIS_FOLDER; |
|
3577 | + $apis_dir = $cacheAPIdir . '/' . CacheApi::APIS_FOLDER; |
|
3580 | 3578 | |
3581 | 3579 | // What accelerator we are going to try. |
3582 | 3580 | $cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT; |
@@ -3588,8 +3586,7 @@ discard block |
||
3588 | 3586 | { |
3589 | 3587 | require_once($file_to_load); |
3590 | 3588 | |
3591 | - $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : |
|
3592 | - CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3589 | + $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3593 | 3590 | |
3594 | 3591 | /* @var CacheApiInterface $cache_api */ |
3595 | 3592 | $cache_api = new $fully_qualified_class_name(); |
@@ -1638,7 +1638,7 @@ |
||
1638 | 1638 | $cacheAPIdir = $sourcedir . '/Cache'; |
1639 | 1639 | |
1640 | 1640 | $loadedApis = array(); |
1641 | - $apis_dir = $cacheAPIdir .'/'. CacheApi::APIS_FOLDER; |
|
1641 | + $apis_dir = $cacheAPIdir . '/' . CacheApi::APIS_FOLDER; |
|
1642 | 1642 | |
1643 | 1643 | $api_classes = new GlobIterator($apis_dir . '/*.php', FilesystemIterator::NEW_CURRENT_AND_KEY); |
1644 | 1644 |