@@ -1622,8 +1622,7 @@ |
||
1622 | 1622 | updateStats('topic'); |
1623 | 1623 | |
1624 | 1624 | // This function is needed to do the updateStats('subject') call. |
1625 | - $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : |
|
1626 | - function($string){ |
|
1625 | + $smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) { |
|
1627 | 1626 | global $sourcedir; |
1628 | 1627 | if (function_exists('mb_strtolower')) |
1629 | 1628 | return mb_strtolower($string, 'UTF-8'); |
@@ -3031,8 +3031,7 @@ |
||
3031 | 3031 | <div class="roundframe"> |
3032 | 3032 | <div> |
3033 | 3033 | ', !empty($context['tfa_backup']) ? ' |
3034 | - <div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : |
|
3035 | - ($modSettings['tfa_mode'] == 2 ? ' |
|
3034 | + <div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : ($modSettings['tfa_mode'] == 2 ? ' |
|
3036 | 3035 | <div class="smalltext"><strong>' . $txt['tfa_forced_desc'] . '</strong></div>' : ''), ' |
3037 | 3036 | <div class="smalltext">', $txt['tfa_desc'], '</div> |
3038 | 3037 | <div id="basicinfo" style="width: 60%"> |
@@ -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>'; |
@@ -259,8 +259,8 @@ |
||
259 | 259 | $time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]); |
260 | 260 | |
261 | 261 | $js_time_string = str_replace( |
262 | - array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'), |
|
263 | - array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'), |
|
262 | + array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'), |
|
263 | + array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'), |
|
264 | 264 | $time_string |
265 | 265 | ); |
266 | 266 |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | $connection |
758 | 758 | ); |
759 | 759 | |
760 | - if(!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
760 | + if (!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
761 | 761 | { |
762 | 762 | if ($returnmode == 1) |
763 | 763 | $return_var = smf_db_insert_id($table, $keys[0]) + count($insertRows) - 1; |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | $return_var = array(); |
767 | 767 | $count = count($insertRows); |
768 | 768 | $start = smf_db_insert_id($table, $keys[0]); |
769 | - for ($i = 0; $i < $count; $i++ ) |
|
769 | + for ($i = 0; $i < $count; $i++) |
|
770 | 770 | $return_var[] = $start + $i; |
771 | 771 | } |
772 | 772 | return $return_var; |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | $connection |
758 | 758 | ); |
759 | 759 | |
760 | - if(!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
760 | + if (!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
761 | 761 | { |
762 | 762 | if ($returnmode == 1) |
763 | 763 | $return_var = smf_db_insert_id($table, $keys[0]) + count($insertRows) - 1; |
@@ -766,7 +766,7 @@ discard block |
||
766 | 766 | $return_var = array(); |
767 | 767 | $count = count($insertRows); |
768 | 768 | $start = smf_db_insert_id($table, $keys[0]); |
769 | - for ($i = 0; $i < $count; $i++ ) |
|
769 | + for ($i = 0; $i < $count; $i++) |
|
770 | 770 | $return_var[] = $start + $i; |
771 | 771 | } |
772 | 772 | return $return_var; |
@@ -763,10 +763,10 @@ discard block |
||
763 | 763 | $returning = ''; |
764 | 764 | $with_returning = false; |
765 | 765 | // lets build the returning string, mysql allow only in normal mode |
766 | - if(!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
766 | + if (!empty($keys) && (count($keys) > 0) && $method == '' && $returnmode > 0) |
|
767 | 767 | { |
768 | 768 | // we only take the first key |
769 | - $returning = ' RETURNING '.$keys[0]; |
|
769 | + $returning = ' RETURNING ' . $keys[0]; |
|
770 | 770 | $with_returning = true; |
771 | 771 | } |
772 | 772 | |
@@ -797,7 +797,7 @@ discard block |
||
797 | 797 | INSERT INTO ' . $table . '("' . implode('", "', $indexed_columns) . '") |
798 | 798 | VALUES |
799 | 799 | ' . implode(', |
800 | - ', $insertRows).$replace.$returning, |
|
800 | + ', $insertRows) . $replace . $returning, |
|
801 | 801 | array( |
802 | 802 | 'security_override' => true, |
803 | 803 | 'db_error_skip' => $method == 'ignore' || $table === $db_prefix . 'log_errors', |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | if ($returnmode === 2) |
811 | 811 | $return_var = array(); |
812 | 812 | |
813 | - while(($row = $smcFunc['db_fetch_row']($request)) && $with_returning) |
|
813 | + while (($row = $smcFunc['db_fetch_row']($request)) && $with_returning) |
|
814 | 814 | { |
815 | 815 | if (is_numeric($row[0])) // try to emulate mysql limitation |
816 | 816 | { |
@@ -104,7 +104,7 @@ |
||
104 | 104 | * |
105 | 105 | * @param string $class The fully-qualified class name. |
106 | 106 | */ |
107 | -spl_autoload_register(function ($class) use ($sourcedir) |
|
107 | +spl_autoload_register(function($class) use ($sourcedir) |
|
108 | 108 | { |
109 | 109 | $classMap = array( |
110 | 110 | 'ReCaptcha\\' => 'ReCaptcha/', |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | // when both paths have nothing in common, one of them is probably |
40 | 40 | // absolute while the other is relative |
41 | 41 | $cwd = getcwd(); |
42 | - $from = strpos($from, $cwd) === 0 ? $from : $cwd.'/'.$from; |
|
43 | - $to = strpos($to, $cwd) === 0 ? $to : $cwd.'/'.$to; |
|
42 | + $from = strpos($from, $cwd) === 0 ? $from : $cwd . '/' . $from; |
|
43 | + $to = strpos($to, $cwd) === 0 ? $to : $cwd . '/' . $to; |
|
44 | 44 | |
45 | 45 | // or traveling the tree via `..` |
46 | 46 | // attempt to resolve path, or assume it's fine if it doesn't exist |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | } |
148 | 148 | |
149 | 149 | // normalize paths |
150 | - $path = $this->normalize($this->from.'/'.$path); |
|
150 | + $path = $this->normalize($this->from . '/' . $path); |
|
151 | 151 | |
152 | 152 | // strip shared ancestor paths |
153 | 153 | $shared = $this->shared($path, $this->to); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | // add .. for every directory that needs to be traversed to new path |
158 | 158 | $to = str_repeat('../', mb_substr_count($to, '/')); |
159 | 159 | |
160 | - return $to.ltrim($path, '/'); |
|
160 | + return $to . ltrim($path, '/'); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |