@@ -61,7 +61,7 @@ |
||
61 | 61 | $server = trim($servers[array_rand($servers)]); |
62 | 62 | |
63 | 63 | // Normal host names do not contain slashes, while e.g. unix sockets do. Assume alternative transport pipe with port 0. |
64 | - if (strpos($server,'/') !== false) |
|
64 | + if (strpos($server, '/') !== false) |
|
65 | 65 | $host = $server; |
66 | 66 | else |
67 | 67 | { |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $currentServers = $this->memcached->getServerList(); |
55 | 55 | foreach ($servers as $server) |
56 | 56 | { |
57 | - if (strpos($server,'/') !== false) |
|
57 | + if (strpos($server, '/') !== false) |
|
58 | 58 | $tempServer = array($server, 0); |
59 | 59 | else |
60 | 60 | { |
@@ -1619,8 +1619,7 @@ |
||
1619 | 1619 | updateStats('topic'); |
1620 | 1620 | |
1621 | 1621 | // This function is needed to do the updateStats('subject') call. |
1622 | - $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : |
|
1623 | - function($string){ |
|
1622 | + $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) { |
|
1624 | 1623 | global $sourcedir; |
1625 | 1624 | if (function_exists('mb_strtolower')) |
1626 | 1625 | return mb_strtolower($string, 'UTF-8'); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | <div id="recent" class="main_section"> |
22 | 22 | <div class="cat_bar"> |
23 | 23 | <h3 class="catbg"> |
24 | - <span class="xx"></span>',$txt['recent_posts'],' |
|
24 | + <span class="xx"></span>',$txt['recent_posts'], ' |
|
25 | 25 | </h3> |
26 | 26 | </div> |
27 | 27 | <div class="pagesection">', $context['page_index'], '</div>'; |
@@ -229,7 +229,7 @@ |
||
229 | 229 | //In maintenance mode, only login is allowed and don't show OverlayDiv |
230 | 230 | echo ' |
231 | 231 | <ul class="floatleft welcome"> |
232 | - <li>', sprintf($txt['welcome_guest'], $txt['guest_title'], '', $scripturl. '?action=login', 'return true;'), '</li> |
|
232 | + <li>', sprintf($txt['welcome_guest'], $txt['guest_title'], '', $scripturl . '?action=login', 'return true;'), '</li> |
|
233 | 233 | </ul>'; |
234 | 234 | |
235 | 235 | if (!empty($modSettings['userLanguage']) && !empty($context['languages']) && count($context['languages']) > 1) |
@@ -197,22 +197,22 @@ discard block |
||
197 | 197 | |
198 | 198 | case 'date': |
199 | 199 | if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d)$~', $replacement, $date_matches) === 1) |
200 | - return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]).'::date'; |
|
200 | + return sprintf('\'%04d-%02d-%02d\'', $date_matches[1], $date_matches[2], $date_matches[3]) . '::date'; |
|
201 | 201 | else |
202 | 202 | smf_db_error_backtrace('Wrong value type sent to the database. Date expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
203 | 203 | break; |
204 | 204 | |
205 | 205 | case 'time': |
206 | 206 | if (preg_match('~^([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $time_matches) === 1) |
207 | - return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]).'::time'; |
|
207 | + return sprintf('\'%02d:%02d:%02d\'', $time_matches[1], $time_matches[2], $time_matches[3]) . '::time'; |
|
208 | 208 | else |
209 | 209 | smf_db_error_backtrace('Wrong value type sent to the database. Time expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
210 | 210 | break; |
211 | 211 | |
212 | 212 | case 'datetime': |
213 | 213 | if (preg_match('~^(\d{4})-([0-1]?\d)-([0-3]?\d) ([0-1]?\d|2[0-3]):([0-5]\d):([0-5]\d)$~', $replacement, $datetime_matches) === 1) |
214 | - return 'to_timestamp('. |
|
215 | - sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5] ,$datetime_matches[6]). |
|
214 | + return 'to_timestamp(' . |
|
215 | + sprintf('\'%04d-%02d-%02d %02d:%02d:%02d\'', $datetime_matches[1], $datetime_matches[2], $datetime_matches[3], $datetime_matches[4], $datetime_matches[5], $datetime_matches[6]) . |
|
216 | 216 | ',\'YYYY-MM-DD HH24:MI:SS\')'; |
217 | 217 | else |
218 | 218 | smf_db_error_backtrace('Wrong value type sent to the database. Datetime expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | if (!empty($keys) && (count($keys) > 0) && $returnmode > 0) |
795 | 795 | { |
796 | 796 | // we only take the first key |
797 | - $returning = ' RETURNING '.$keys[0]; |
|
797 | + $returning = ' RETURNING ' . $keys[0]; |
|
798 | 798 | $with_returning = true; |
799 | 799 | } |
800 | 800 | |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | INSERT INTO ' . $table . '("' . implode('", "', $indexed_columns) . '") |
826 | 826 | VALUES |
827 | 827 | ' . implode(', |
828 | - ', $insertRows).$replace.$returning, |
|
828 | + ', $insertRows) . $replace . $returning, |
|
829 | 829 | array( |
830 | 830 | 'security_override' => true, |
831 | 831 | 'db_error_skip' => $method == 'ignore' || $table === $db_prefix . 'log_errors', |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | if ($returnmode === 2) |
839 | 839 | $return_var = array(); |
840 | 840 | |
841 | - while(($row = $smcFunc['db_fetch_row']($request)) && $with_returning) |
|
841 | + while (($row = $smcFunc['db_fetch_row']($request)) && $with_returning) |
|
842 | 842 | { |
843 | 843 | if (is_numeric($row[0])) // try to emulate mysql limitation |
844 | 844 | { |
@@ -1719,7 +1719,7 @@ |
||
1719 | 1719 | $id_theme = $modSettings['theme_guests']; |
1720 | 1720 | |
1721 | 1721 | // We already load the basic stuff? |
1722 | - if (empty($settings['theme_id']) || $settings['theme_id'] != $id_theme ) |
|
1722 | + if (empty($settings['theme_id']) || $settings['theme_id'] != $id_theme) |
|
1723 | 1723 | { |
1724 | 1724 | // Verify the id_theme... no foul play. |
1725 | 1725 | // Always allow the board specific theme, if they are overriding. |
@@ -3014,8 +3014,7 @@ |
||
3014 | 3014 | <div class="roundframe"> |
3015 | 3015 | <div> |
3016 | 3016 | ', !empty($context['tfa_backup']) ? ' |
3017 | - <div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : |
|
3018 | - ($modSettings['tfa_mode'] == 2 ? ' |
|
3017 | + <div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : ($modSettings['tfa_mode'] == 2 ? ' |
|
3019 | 3018 | <div class="smalltext"><strong>' . $txt['tfa_forced_desc'] . '</strong></div>' : ''), ' |
3020 | 3019 | <div class="smalltext">', $txt['tfa_desc'], '</div> |
3021 | 3020 | <div class="floatleft"> |
@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | // Get the data and path to set it on. |
60 | 60 | $cookie_url = url_parts(!empty($modSettings['localCookies']), !empty($modSettings['globalCookies'])); |
61 | - $dataAr = empty($id) ? array(0, '', 0, 'path' => $cookie_url[1]) : array($id, $password, time() + $cookie_length, $cookie_state,'path' => $cookie_url[1]); |
|
61 | + $dataAr = empty($id) ? array(0, '', 0, 'path' => $cookie_url[1]) : array($id, $password, time() + $cookie_length, $cookie_state, 'path' => $cookie_url[1]); |
|
62 | 62 | $data = $smcFunc['json_encode']($dataAr); |
63 | 63 | |
64 | 64 | // Set the cookie, $_COOKIE, and session variable. |