@@ -738,7 +738,7 @@ |
||
738 | 738 | ); |
739 | 739 | else |
740 | 740 | $context['allowed_actions'] = array( |
741 | - 'ok' => $txt['admin_browse_w_approve'] .' '. $txt['admin_browse_no_email'], |
|
741 | + 'ok' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_no_email'], |
|
742 | 742 | 'okemail' => $txt['admin_browse_w_approve'] . ' ' . $txt['admin_browse_w_email'], |
743 | 743 | 'require_activation' => $txt['admin_browse_w_approve_require_activate'], |
744 | 744 | 'reject' => $txt['admin_browse_w_reject'], |
@@ -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 | } |
@@ -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; |
@@ -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 |
@@ -644,13 +644,13 @@ discard block |
||
644 | 644 | 'quickbuttons' => array( |
645 | 645 | 'edit' => array( |
646 | 646 | 'label' => $txt['draft_edit'], |
647 | - 'href' => $scripturl.'?action=post;'.(empty($row['id_topic']) ? 'board='.$row['id_board'] : 'topic='.$row['id_topic']).'.0;id_draft='.$row['id_draft'], |
|
647 | + 'href' => $scripturl . '?action=post;' . (empty($row['id_topic']) ? 'board=' . $row['id_board'] : 'topic=' . $row['id_topic']) . '.0;id_draft=' . $row['id_draft'], |
|
648 | 648 | 'icon' => 'modify_button' |
649 | 649 | ), |
650 | 650 | 'delete' => array( |
651 | 651 | 'label' => $txt['draft_delete'], |
652 | - 'href' => $scripturl.'?action=profile;u='.$context['member']['id'].';area=showdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
653 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'"', |
|
652 | + 'href' => $scripturl . '?action=profile;u=' . $context['member']['id'] . ';area=showdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
653 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '"', |
|
654 | 654 | 'class' => 'you_sure', |
655 | 655 | 'icon' => 'remove_button' |
656 | 656 | ), |
@@ -837,13 +837,13 @@ discard block |
||
837 | 837 | 'quickbuttons' => array( |
838 | 838 | 'edit' => array( |
839 | 839 | 'label' => $txt['draft_edit'], |
840 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;id_draft='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
840 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;id_draft=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
841 | 841 | 'icon' => 'modify_button' |
842 | 842 | ), |
843 | 843 | 'delete' => array( |
844 | 844 | 'label' => $txt['draft_delete'], |
845 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
846 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'?"', |
|
845 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
846 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '?"', |
|
847 | 847 | 'class' => 'you_sure', |
848 | 848 | 'icon' => 'remove_button' |
849 | 849 | ), |
@@ -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}', |
@@ -467,20 +467,20 @@ |
||
467 | 467 | $context['posts'][$key]['quickbuttons'] = array( |
468 | 468 | 'reply' => array( |
469 | 469 | 'label' => $txt['reply'], |
470 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
470 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
471 | 471 | 'icon' => 'reply_button', |
472 | 472 | 'show' => $post['can_reply'] |
473 | 473 | ), |
474 | 474 | 'quote' => array( |
475 | 475 | 'label' => $txt['quote_action'], |
476 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
476 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
477 | 477 | 'icon' => 'quote', |
478 | 478 | 'show' => $post['can_quote'] |
479 | 479 | ), |
480 | 480 | 'delete' => array( |
481 | 481 | 'label' => $txt['remove'], |
482 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';recent;'.$context['session_var'].'='.$context['session_id'], |
|
483 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'"', |
|
482 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';recent;' . $context['session_var'] . '=' . $context['session_id'], |
|
483 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '"', |
|
484 | 484 | 'class' => 'you_sure', |
485 | 485 | 'icon' => 'remove_button', |
486 | 486 | 'show' => $post['can_delete'] |
@@ -1289,7 +1289,6 @@ |
||
1289 | 1289 | if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages']) |
1290 | 1290 | $pages .= sprintf(strtr($settings['page_index']['page'], array('{URL}' => $scripturl . '?topic=' . $row['id_topic'] . '.0;all')), '', $txt['all']); |
1291 | 1291 | } |
1292 | - |
|
1293 | 1292 | else |
1294 | 1293 | $pages = ''; |
1295 | 1294 |