@@ -1823,7 +1823,7 @@ |
||
1823 | 1823 | if (!empty($excluded_groups)) |
1824 | 1824 | { |
1825 | 1825 | // Make sure this is an array of integers |
1826 | - $excluded_groups = array_filter((array) $excluded_groups, function ($v) |
|
1826 | + $excluded_groups = array_filter((array) $excluded_groups, function($v) |
|
1827 | 1827 | { |
1828 | 1828 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
1829 | 1829 | }); |
@@ -1824,7 +1824,7 @@ |
||
1824 | 1824 | { |
1825 | 1825 | // Make sure this is an array of integers |
1826 | 1826 | $excluded_groups = array_filter((array) $excluded_groups, function ($v) |
1827 | - { |
|
1827 | + { |
|
1828 | 1828 | return is_int($v) || is_string($v) && (string) intval($v) === $v; |
1829 | 1829 | }); |
1830 | 1830 |
@@ -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(); |
@@ -143,7 +143,7 @@ |
||
143 | 143 | |
144 | 144 | // Redirect to the selector if they chose selective. |
145 | 145 | if ($_POST['step2'] == 'selective') |
146 | - redirectexit ('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0'); |
|
146 | + redirectexit('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0'); |
|
147 | 147 | |
148 | 148 | $_POST['at'] = (int) $_POST['at']; |
149 | 149 | $messagesToBeSplit = array(); |
@@ -869,7 +869,6 @@ |
||
869 | 869 | $can_approve_boards = boardsAllowedTo('approve_posts'); |
870 | 870 | $onlyApproved = $can_approve_boards !== array(0) && !in_array($_REQUEST['targetboard'], $can_approve_boards); |
871 | 871 | } |
872 | - |
|
873 | 872 | else |
874 | 873 | $onlyApproved = false; |
875 | 874 |
@@ -619,7 +619,7 @@ |
||
619 | 619 | if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn()) |
620 | 620 | fatal_lang_error('login_ssl_required', false); |
621 | 621 | |
622 | - $password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : ''; |
|
622 | + $password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : ''; |
|
623 | 623 | |
624 | 624 | // You didn't even enter a password! |
625 | 625 | if (trim($password) == '') |
@@ -1257,7 +1257,6 @@ discard block |
||
1257 | 1257 | |
1258 | 1258 | continue; |
1259 | 1259 | } |
1260 | - |
|
1261 | 1260 | else |
1262 | 1261 | { |
1263 | 1262 | $fh = @fopen($path . '/.htaccess', 'w'); |
@@ -1269,7 +1268,6 @@ discard block |
||
1269 | 1268 | Deny from all' . $close); |
1270 | 1269 | fclose($fh); |
1271 | 1270 | } |
1272 | - |
|
1273 | 1271 | else |
1274 | 1272 | $errors[] = 'htaccess_cannot_create_file'; |
1275 | 1273 | } |
@@ -1280,7 +1278,6 @@ discard block |
||
1280 | 1278 | |
1281 | 1279 | continue; |
1282 | 1280 | } |
1283 | - |
|
1284 | 1281 | else |
1285 | 1282 | { |
1286 | 1283 | $fh = @fopen($path . '/index.php', 'w'); |
@@ -1307,7 +1304,6 @@ discard block |
||
1307 | 1304 | ?' . '>'); |
1308 | 1305 | fclose($fh); |
1309 | 1306 | } |
1310 | - |
|
1311 | 1307 | else |
1312 | 1308 | $errors[] = 'index-php_cannot_create_file'; |
1313 | 1309 | } |
@@ -816,7 +816,7 @@ |
||
816 | 816 | |
817 | 817 | $out = 'POST /smf/stats/collect_stats.php HTTP/1.1' . "\r\n"; |
818 | 818 | $out .= 'Host: www.simplemachines.org' . "\r\n"; |
819 | - $out .= 'user-agent: '. SMF_USER_AGENT . "\r\n"; |
|
819 | + $out .= 'user-agent: ' . SMF_USER_AGENT . "\r\n"; |
|
820 | 820 | $out .= 'content-type: application/x-www-form-urlencoded' . "\r\n"; |
821 | 821 | $out .= 'connection: Close' . "\r\n"; |
822 | 822 | $out .= 'content-length: ' . $length . "\r\n\r\n"; |
@@ -67,8 +67,7 @@ |
||
67 | 67 | $sound_letter = substr($sound_letter, strpos($sound_letter, 'data') + 8); |
68 | 68 | switch ($word[$i] === 's' ? 0 : mt_rand(0, 2)) |
69 | 69 | { |
70 | - case 0 : |
|
71 | - for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++) |
|
70 | + case 0 : for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++) |
|
72 | 71 | for ($k = 0, $m = round(mt_rand(15, 25) / 10); $k < $m; $k++) |
73 | 72 | $sound_word .= $word[$i] === 's' ? $sound_letter[$j] : chr(mt_rand(max(ord($sound_letter[$j]) - 1, 0x00), min(ord($sound_letter[$j]) + 1, 0xFF))); |
74 | 73 | break; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | clean_cache(); |
170 | 170 | |
171 | 171 | // If warning decrement is enabled and we have people who have not had a new warning in 24 hours, lower their warning level. |
172 | - list (, , $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']); |
|
172 | + list (,, $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']); |
|
173 | 173 | if ($modSettings['warning_decrement']) |
174 | 174 | { |
175 | 175 | // Find every member who has a warning level... |
@@ -1622,7 +1622,7 @@ discard block |
||
1622 | 1622 | // Determine action based on last_login... |
1623 | 1623 | $purgeMembers = array(); |
1624 | 1624 | $markReadMembers = array(); |
1625 | - foreach($members as $member) |
|
1625 | + foreach ($members as $member) |
|
1626 | 1626 | { |
1627 | 1627 | if ($member['last_login'] <= $cleanupBeyond) |
1628 | 1628 | $purgeMembers[] = $member['id_member']; |
@@ -2263,7 +2263,7 @@ |
||
2263 | 2263 | { |
2264 | 2264 | uasort($loaded_attachments, function($a, $b) { |
2265 | 2265 | if ($a['filesize'] == $b['filesize']) |
2266 | - return 0; |
|
2266 | + return 0; |
|
2267 | 2267 | return ($a['filesize'] < $b['filesize']) ? -1 : 1; |
2268 | 2268 | }); |
2269 | 2269 | } |
@@ -2261,7 +2261,8 @@ |
||
2261 | 2261 | // Sort the attachments by size to make things easier below |
2262 | 2262 | if (!empty($loaded_attachments)) |
2263 | 2263 | { |
2264 | - uasort($loaded_attachments, function($a, $b) { |
|
2264 | + uasort($loaded_attachments, function($a, $b) |
|
2265 | + { |
|
2265 | 2266 | if ($a['filesize'] == $b['filesize']) |
2266 | 2267 | return 0; |
2267 | 2268 | return ($a['filesize'] < $b['filesize']) ? -1 : 1; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | ); |
93 | 93 | foreach (array('action', 'sa', 'type', 'board', 'boards', 'c', 'u', 'limit', 'offset') as $var) |
94 | 94 | if (isset($_GET[$var])) |
95 | - $feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';' ) . $var . '=' . $_GET[$var]; |
|
95 | + $feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';') . $var . '=' . $_GET[$var]; |
|
96 | 96 | |
97 | 97 | // Handle the cases where a board, boards, or category is asked for. |
98 | 98 | $query_this_board = 1; |
@@ -299,17 +299,17 @@ discard block |
||
299 | 299 | * namespaces, which could cause it to mangle the XML horrifically |
300 | 300 | * during processing. |
301 | 301 | */ |
302 | - $smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/' . $subaction; |
|
302 | + $smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/' . $subaction; |
|
303 | 303 | |
304 | 304 | // Allow mods to add extra namespaces and tags to the feed/channel |
305 | 305 | $namespaces = array( |
306 | 306 | 'rss' => array(), |
307 | - 'rss2' => array('atom' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'), |
|
308 | - 'atom' => array('' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'), |
|
307 | + 'rss2' => array('atom' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'), |
|
308 | + 'atom' => array('' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'), |
|
309 | 309 | 'rdf' => array( |
310 | - '' => 'htt'.'p:/'.'/purl.o'.'rg/rss/1.0/', |
|
311 | - 'rdf' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/02/22-rdf-syntax-ns#', |
|
312 | - 'dc' => 'htt'.'p:/'.'/purl.o'.'rg/dc/elements/1.1/', |
|
310 | + '' => 'htt' . 'p:/' . '/purl.o' . 'rg/rss/1.0/', |
|
311 | + 'rdf' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/02/22-rdf-syntax-ns#', |
|
312 | + 'dc' => 'htt' . 'p:/' . '/purl.o' . 'rg/dc/elements/1.1/', |
|
313 | 313 | ), |
314 | 314 | 'smf' => array( |
315 | 315 | 'smf' => $smf_ns, |