@@ -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']; |
@@ -330,7 +330,7 @@ |
||
| 330 | 330 | WHERE t.id_board = {int:current_board} ' |
| 331 | 331 | . (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : ' |
| 332 | 332 | AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . (!empty($message_index_topic_wheres) ? ' |
| 333 | - AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : ''). ' |
|
| 333 | + AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : '') . ' |
|
| 334 | 334 | ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . ' |
| 335 | 335 | LIMIT {int:maxindex} |
| 336 | 336 | OFFSET {int:start} '; |
@@ -1241,7 +1241,7 @@ |
||
| 1241 | 1241 | // File Upload. |
| 1242 | 1242 | if ($context['can_post_attachment']) |
| 1243 | 1243 | { |
| 1244 | - $acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(function ($val) use ($smcFunc) |
|
| 1244 | + $acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(function($val) use ($smcFunc) |
|
| 1245 | 1245 | { |
| 1246 | 1246 | return !empty($val) ? ('.' . $smcFunc['htmltrim']($val)) : ''; |
| 1247 | 1247 | }, explode(',', $context['allowed_extensions']))); |
@@ -282,7 +282,7 @@ |
||
| 282 | 282 | '{db_prefix}log_notify', |
| 283 | 283 | array('id_member' => 'int', 'id_topic' => 'int', 'id_board' => 'int'), |
| 284 | 284 | array($user_info['id'], $log['id_topic'], 0), |
| 285 | - array('id_member','id_topic', 'id_board') |
|
| 285 | + array('id_member', 'id_topic', 'id_board') |
|
| 286 | 286 | ); |
| 287 | 287 | } |
| 288 | 288 | else |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | if ($type == 'edit') |
| 119 | 119 | { |
| 120 | 120 | // Filter out members who have already been notified about this post's topic |
| 121 | - $unnotified = array_filter($watched, function ($member) |
|
| 121 | + $unnotified = array_filter($watched, function($member) |
|
| 122 | 122 | { |
| 123 | 123 | return empty($member['sent']); |
| 124 | 124 | }); |
@@ -204,8 +204,7 @@ discard block |
||
| 204 | 204 | if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($prefs[$member_id])) |
| 205 | 205 | { |
| 206 | 206 | $pref = !empty($prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ? |
| 207 | - $prefs[$member_id]['topic_notify_' . $topicOptions['id']] : |
|
| 208 | - (!empty($prefs[$member_id]['topic_notify']) ? $prefs[$member_id]['topic_notify'] : 0); |
|
| 207 | + $prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($prefs[$member_id]['topic_notify']) ? $prefs[$member_id]['topic_notify'] : 0); |
|
| 209 | 208 | |
| 210 | 209 | $message_type = 'notification_' . $type; |
| 211 | 210 | |
@@ -224,8 +223,7 @@ discard block |
||
| 224 | 223 | elseif ($type == 'topic') |
| 225 | 224 | { |
| 226 | 225 | $pref = !empty($prefs[$member_id]['board_notify_' . $topicOptions['board']]) ? |
| 227 | - $prefs[$member_id]['board_notify_' . $topicOptions['board']] : |
|
| 228 | - (!empty($prefs[$member_id]['board_notify']) ? $prefs[$member_id]['board_notify'] : 0); |
|
| 226 | + $prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($prefs[$member_id]['board_notify']) ? $prefs[$member_id]['board_notify'] : 0); |
|
| 229 | 227 | |
| 230 | 228 | $content_type = 'board'; |
| 231 | 229 | |
@@ -317,7 +317,7 @@ |
||
| 317 | 317 | { |
| 318 | 318 | // PHPBB 3 check this function exists in PHP 5.5 or higher |
| 319 | 319 | if (function_exists('password_verify')) |
| 320 | - $other_passwords[] = password_verify($_POST['passwrd'],$user_settings['password_salt']); |
|
| 320 | + $other_passwords[] = password_verify($_POST['passwrd'], $user_settings['password_salt']); |
|
| 321 | 321 | |
| 322 | 322 | // PHP-Fusion |
| 323 | 323 | $other_passwords[] = hash_hmac('sha256', $_POST['passwrd'], $user_settings['password_salt']); |
@@ -355,8 +355,8 @@ |
||
| 355 | 355 | elseif (isset($_POST['delall']) && isset($filter)) |
| 356 | 356 | { |
| 357 | 357 | // ip need a different placeholder type |
| 358 | - $filter_type = $filter['variable'] == 'ip'? 'inet' : 'string'; |
|
| 359 | - $filter_op = $filter['variable'] == 'ip'? '=' : 'LIKE'; |
|
| 358 | + $filter_type = $filter['variable'] == 'ip' ? 'inet' : 'string'; |
|
| 359 | + $filter_op = $filter['variable'] == 'ip' ? '=' : 'LIKE'; |
|
| 360 | 360 | $smcFunc['db_query']('', ' |
| 361 | 361 | DELETE FROM {db_prefix}log_errors |
| 362 | 362 | WHERE ' . $filter['variable'] . ' ' . $filter_op . ' {' . $filter_type . ':filter}', |
@@ -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, |