@@ -185,14 +185,14 @@ discard block |
||
| 185 | 185 | $report_buttons = array( |
| 186 | 186 | 'ignore' => array( |
| 187 | 187 | 'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', |
| 188 | - 'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;ignore='.(int) !$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
| 188 | + 'url' => $scripturl . '?action=moderate;area=reportedposts;sa=handle;ignore=' . (int) !$context['report']['ignore'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
| 189 | 189 | 'class' => !$context['report']['ignore'] ? ' you_sure' : '', |
| 190 | 190 | 'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
| 191 | 191 | 'icon' => 'ignore' |
| 192 | 192 | ), |
| 193 | 193 | 'close' => array( |
| 194 | 194 | 'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', |
| 195 | - 'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;closed='.(int) !$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
| 195 | + 'url' => $scripturl . '?action=moderate;area=reportedposts;sa=handle;closed=' . (int) !$context['report']['closed'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
| 196 | 196 | 'icon' => 'close' |
| 197 | 197 | ) |
| 198 | 198 | ); |
@@ -465,14 +465,14 @@ discard block |
||
| 465 | 465 | $report_buttons = array( |
| 466 | 466 | 'ignore' => array( |
| 467 | 467 | 'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore', |
| 468 | - 'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;ignore='.(int)!$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
| 468 | + 'url' => $scripturl . '?action=moderate;area=reportedmembers;sa=handle;ignore=' . (int) !$context['report']['ignore'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
| 469 | 469 | 'class' => !$context['report']['ignore'] ? ' you_sure' : '', |
| 470 | 470 | 'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
| 471 | 471 | 'icon' => 'ignore' |
| 472 | 472 | ), |
| 473 | 473 | 'close' => array( |
| 474 | 474 | 'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close', |
| 475 | - 'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;closed='.(int)!$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
| 475 | + 'url' => $scripturl . '?action=moderate;area=reportedmembers;sa=handle;closed=' . (int) !$context['report']['closed'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
| 476 | 476 | 'icon' => 'close' |
| 477 | 477 | ) |
| 478 | 478 | ); |
@@ -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) == '') |
@@ -100,18 +100,22 @@ |
||
| 100 | 100 | $tempTab++; |
| 101 | 101 | $context['tabindex'] = $tempTab; |
| 102 | 102 | |
| 103 | - foreach ($context['richedit_buttons'] as $name => $button) { |
|
| 104 | - if ($name == 'spell_check') { |
|
| 103 | + foreach ($context['richedit_buttons'] as $name => $button) |
|
| 104 | + { |
|
| 105 | + if ($name == 'spell_check') |
|
| 106 | + { |
|
| 105 | 107 | $button['onclick'] = 'oEditorHandle_' . $editor_id . '.spellCheckStart();'; |
| 106 | 108 | } |
| 107 | 109 | |
| 108 | - if ($name == 'preview') { |
|
| 110 | + if ($name == 'preview') |
|
| 111 | + { |
|
| 109 | 112 | $button['value'] = isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $button['value']; |
| 110 | 113 | $button['onclick'] = $editor_context['preview_type'] == 2 ? '' : 'return submitThisOnce(this);'; |
| 111 | 114 | $button['show'] = $editor_context['preview_type']; |
| 112 | 115 | } |
| 113 | 116 | |
| 114 | - if ($button['show']) { |
|
| 117 | + if ($button['show']) |
|
| 118 | + { |
|
| 115 | 119 | echo ' |
| 116 | 120 | <input type="', $button['type'], '"', $button['type'] == 'hidden' ? ' id="' . $name . '"' : '', ' name="', $name, '" value="', $button['value'], '"', $button['type'] != 'hidden' ? ' tabindex="' . --$tempTab . '"' : '', !empty($button['onclick']) ? ' onclick="' . $button['onclick'] . '"' : '', !empty($button['accessKey']) ? ' accesskey="' . $button['accessKey'] . '"' : '', $button['type'] != 'hidden' ? ' class="button"' : '', '>'; |
| 117 | 121 | } |
@@ -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']; |
@@ -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'] |
@@ -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 |