@@ -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']; |
@@ -695,7 +695,7 @@ |
||
695 | 695 | 'icon' => 'move', |
696 | 696 | ), |
697 | 697 | 'quickmod' => array( |
698 | - 'class' => 'inline_mod_check', |
|
698 | + 'class' => 'inline_mod_check', |
|
699 | 699 | 'content' => '<input type="checkbox" name="mark[' . $id . ']" value="' . $id . '">', |
700 | 700 | 'show' => $context['showCheckboxes'] |
701 | 701 | ) |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | AND a.is_read = 0' : '') . (!empty($alertIDs) ? ' |
263 | 263 | AND a.id_alert IN ({array_int:alertIDs})' : '') . ' |
264 | 264 | ORDER BY id_alert DESC' . (!empty($limit) ? ' |
265 | - LIMIT {int:limit}' : '') . (!empty($offset) ?' |
|
265 | + LIMIT {int:limit}' : '') . (!empty($offset) ? ' |
|
266 | 266 | OFFSET {int:offset}' : ''), |
267 | 267 | array( |
268 | 268 | 'id_member' => $memID, |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | |
362 | 362 | // Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.) |
363 | 363 | $formats = array_map( |
364 | - function ($format) use ($scripturl) |
|
364 | + function($format) use ($scripturl) |
|
365 | 365 | { |
366 | 366 | $format['link'] = str_replace('{scripturl}', $scripturl, $format['link']); |
367 | 367 | $format['text'] = str_replace('{scripturl}', $scripturl, $format['text']); |
@@ -1172,20 +1172,20 @@ discard block |
||
1172 | 1172 | $context['posts'][$key]['quickbuttons'] = array( |
1173 | 1173 | 'reply' => array( |
1174 | 1174 | 'label' => $txt['reply'], |
1175 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
1175 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
1176 | 1176 | 'icon' => 'reply_button', |
1177 | 1177 | 'show' => $post['can_reply'] |
1178 | 1178 | ), |
1179 | 1179 | 'quote' => array( |
1180 | 1180 | 'label' => $txt['quote_action'], |
1181 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
1181 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
1182 | 1182 | 'icon' => 'quote', |
1183 | 1183 | 'show' => $post['can_quote'] |
1184 | 1184 | ), |
1185 | 1185 | 'remove' => array( |
1186 | 1186 | 'label' => $txt['remove'], |
1187 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
1188 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'"', |
|
1187 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1188 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '"', |
|
1189 | 1189 | 'class' => 'you_sure', |
1190 | 1190 | 'icon' => 'remove_button', |
1191 | 1191 | 'show' => $post['can_delete'] |
@@ -574,7 +574,7 @@ |
||
574 | 574 | $value['id'] = $key; |
575 | 575 | |
576 | 576 | $button = ' |
577 | - <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>'.(!empty($value['icon']) ? '<span class="main_icons '.$value['icon'].'"></span>' : '').'' . $txt[$value['text']] . '</a>'; |
|
577 | + <a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . (!empty($value['icon']) ? '<span class="main_icons ' . $value['icon'] . '"></span>' : '') . '' . $txt[$value['text']] . '</a>'; |
|
578 | 578 | |
579 | 579 | if (!empty($value['sub_buttons'])) |
580 | 580 | { |
@@ -1931,7 +1931,7 @@ |
||
1931 | 1931 | <div class="floatright smalltext righttext"> |
1932 | 1932 | <div class="recipient_to">« <strong>', $txt['to'], ':</strong> ', implode(', ', $draft['recipients']['to']), ' »</div>'; |
1933 | 1933 | |
1934 | - if(!empty($draft['recipients']['bcc'])) |
|
1934 | + if (!empty($draft['recipients']['bcc'])) |
|
1935 | 1935 | echo' |
1936 | 1936 | <div class="pm_bbc">« <strong>', $txt['pm_bcc'], ':</strong> ', implode(', ', $draft['recipients']['bcc']), ' »</div>'; |
1937 | 1937 |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])])); |
501 | 501 | |
502 | 502 | $context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set) |
503 | - { |
|
503 | + { |
|
504 | 504 | return $v != $set; |
505 | 505 | }); |
506 | 506 | } |
@@ -3467,7 +3467,6 @@ discard block |
||
3467 | 3467 | } |
3468 | 3468 | } |
3469 | 3469 | } |
3470 | - |
|
3471 | 3470 | elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar) |
3472 | 3471 | { |
3473 | 3472 | if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar) |
@@ -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 |
@@ -310,7 +310,7 @@ |
||
310 | 310 | { |
311 | 311 | /** |
312 | 312 | * Constants for notification types. |
313 | - */ |
|
313 | + */ |
|
314 | 314 | const RECEIVE_NOTIFY_EMAIL = 0x02; |
315 | 315 | const RECEIVE_NOTIFY_ALERT = 0x01; |
316 | 316 |
@@ -93,7 +93,6 @@ |
||
93 | 93 | if ($ts <= 0 || $ts % 15 != 0 || time() - $ts < 0 || time() - $ts > 20) |
94 | 94 | obExit_cron(); |
95 | 95 | } |
96 | - |
|
97 | 96 | else |
98 | 97 | $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0'; |
99 | 98 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | { |
20 | 20 | /** |
21 | 21 | * Constants for reply types. |
22 | - */ |
|
22 | + */ |
|
23 | 23 | const NOTIFY_TYPE_REPLY_AND_MODIFY = 1; |
24 | 24 | const NOTIFY_TYPE_REPLY_AND_TOPIC_START_FOLLOWING = 2; |
25 | 25 | const NOTIFY_TYPE_ONLY_REPLIES = 3; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Constants for frequencies. |
30 | - */ |
|
30 | + */ |
|
31 | 31 | const FREQUENCY_NOTHING = 0; |
32 | 32 | const FREQUENCY_EVERYTHING = 1; |
33 | 33 | const FREQUENCY_FIRST_UNREAD_MSG = 2; |
@@ -266,7 +266,6 @@ |
||
266 | 266 | $user_info = $real_user_info; |
267 | 267 | unset($real_user_info); |
268 | 268 | } |
269 | - |
|
270 | 269 | else |
271 | 270 | $user_info = null; |
272 | 271 |
@@ -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']); |
@@ -64,8 +64,7 @@ discard block |
||
64 | 64 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
65 | 65 | && isset($_REQUEST['ajax']) |
66 | 66 | ) |
67 | - ) |
|
68 | - { |
|
67 | + ) { |
|
69 | 68 | $context['from_ajax'] = true; |
70 | 69 | $context['template_layers'] = array(); |
71 | 70 | } |
@@ -137,8 +136,7 @@ discard block |
||
137 | 136 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
138 | 137 | && isset($_REQUEST['ajax']) |
139 | 138 | ) |
140 | - ) |
|
141 | - { |
|
139 | + ) { |
|
142 | 140 | $context['from_ajax'] = true; |
143 | 141 | $context['template_layers'] = array(); |
144 | 142 | } |
@@ -517,8 +515,7 @@ discard block |
||
517 | 515 | && !empty($_SERVER['HTTP_X_SMF_AJAX']) |
518 | 516 | && isset($_REQUEST['ajax']) |
519 | 517 | ) |
520 | - ) |
|
521 | - { |
|
518 | + ) { |
|
522 | 519 | $context['from_ajax'] = true; |
523 | 520 | $context['template_layers'] = array(); |
524 | 521 | } |