@@ -1282,7 +1282,7 @@ |
||
1282 | 1282 | // File Upload. |
1283 | 1283 | if ($context['can_post_attachment']) |
1284 | 1284 | { |
1285 | - $acceptedFiles = implode(',', array_map(function ($val) use ($smcFunc) |
|
1285 | + $acceptedFiles = implode(',', array_map(function($val) use ($smcFunc) |
|
1286 | 1286 | { |
1287 | 1287 | return '.' . $smcFunc['htmltrim']($val); |
1288 | 1288 | }, explode(',', $context['allowed_extensions']))); |
@@ -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) == '') |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | { |
423 | 423 | $extra = $alerts[$id_alert]['extra']; |
424 | 424 | $search = array('{member_link}', '{scripturl}'); |
425 | - $repl = array(!empty($alert['sender_id']) && $alert['show_links'] ? '<a href="' . $scripturl . '?action=profile;u=' . $alert['sender_id'] . '">' . $alert['sender_name'] . '</a>' : '<strong>'.$alert['sender_name'].'</strong>', $scripturl); |
|
425 | + $repl = array(!empty($alert['sender_id']) && $alert['show_links'] ? '<a href="' . $scripturl . '?action=profile;u=' . $alert['sender_id'] . '">' . $alert['sender_name'] . '</a>' : '<strong>' . $alert['sender_name'] . '</strong>', $scripturl); |
|
426 | 426 | |
427 | 427 | if (is_array($extra)) |
428 | 428 | { |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | // Are we opening a specific alert ? |
454 | 454 | if (!empty($_REQUEST['alert'])) |
455 | 455 | { |
456 | - $alert_id = (int)$_REQUEST['alert']; |
|
456 | + $alert_id = (int) $_REQUEST['alert']; |
|
457 | 457 | $request = $smcFunc['db_query']('', ' |
458 | 458 | SELECT id_member, id_member_started, content_type, content_action, content_id, is_read, extra |
459 | 459 | FROM {db_prefix}user_alerts |
@@ -466,10 +466,10 @@ discard block |
||
466 | 466 | $smcFunc['db_free_result']($request); |
467 | 467 | |
468 | 468 | // Can the user see this alert ? |
469 | - if($memID != $alert['id_member']) |
|
469 | + if ($memID != $alert['id_member']) |
|
470 | 470 | redirectexit(); |
471 | 471 | |
472 | - if(!empty($alert['extra'])) |
|
472 | + if (!empty($alert['extra'])) |
|
473 | 473 | $alert['extra'] = $smcFunc['json_decode']($alert['extra'], true); |
474 | 474 | |
475 | 475 | // Determine where the alert takes |
@@ -540,17 +540,17 @@ discard block |
||
540 | 540 | $context['alerts'][$id]['quickbuttons'] = array( |
541 | 541 | 'delete' => array( |
542 | 542 | 'label' => $txt['delete'], |
543 | - 'href' => $scripturl.'?action=profile;u='.$context['id_member'].';area=showalerts;do=remove;aid='.$id.';'.$context['session_var'].'='.$context['session_id'], |
|
543 | + 'href' => $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=showalerts;do=remove;aid=' . $id . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
544 | 544 | 'javascript' => 'class="you_sure"', |
545 | 545 | 'icon' => 'remove_button' |
546 | 546 | ), |
547 | 547 | 'mark' => array( |
548 | 548 | 'label' => $alert['is_read'] != 0 ? $txt['mark_unread'] : $txt['mark_read_short'], |
549 | - 'href' => $scripturl.'?action=profile;u='.$context['id_member'].';area=showalerts;do='.($alert['is_read'] != 0 ? 'unread' : 'read').';aid='.$id.';'.$context['session_var'].'='.$context['session_id'], |
|
549 | + 'href' => $scripturl . '?action=profile;u=' . $context['id_member'] . ';area=showalerts;do=' . ($alert['is_read'] != 0 ? 'unread' : 'read') . ';aid=' . $id . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
550 | 550 | 'icon' => $alert['is_read'] != 0 ? 'unread_button' : 'read_button', |
551 | 551 | ), |
552 | 552 | 'quickmod' => array( |
553 | - 'content' => '<input type="checkbox" name="mark['.$id.']" value="'.$id.'">', |
|
553 | + 'content' => '<input type="checkbox" name="mark[' . $id . ']" value="' . $id . '">', |
|
554 | 554 | 'show' => $context['showCheckboxes'] |
555 | 555 | ) |
556 | 556 | ); |
@@ -963,20 +963,20 @@ discard block |
||
963 | 963 | $context['posts'][$key]['quickbuttons'] = array( |
964 | 964 | 'reply' => array( |
965 | 965 | 'label' => $txt['reply'], |
966 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
966 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
967 | 967 | 'icon' => 'reply_button', |
968 | 968 | 'show' => $post['can_reply'] |
969 | 969 | ), |
970 | 970 | 'quote' => array( |
971 | 971 | 'label' => $txt['quote_action'], |
972 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
972 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
973 | 973 | 'icon' => 'quote', |
974 | 974 | 'show' => $post['can_quote'] |
975 | 975 | ), |
976 | 976 | 'remove' => array( |
977 | 977 | 'label' => $txt['remove'], |
978 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
979 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"', |
|
978 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
979 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"', |
|
980 | 980 | 'icon' => 'remove_button', |
981 | 981 | 'show' => $post['can_delete'] |
982 | 982 | ) |
@@ -302,7 +302,6 @@ discard block |
||
302 | 302 | $condition = 'id_member IN ({array_int:members})'; |
303 | 303 | $parameters['members'] = $members; |
304 | 304 | } |
305 | - |
|
306 | 305 | elseif ($members === null) |
307 | 306 | $condition = '1=1'; |
308 | 307 | |
@@ -1970,7 +1969,7 @@ discard block |
||
1970 | 1969 | 'tag' => 'cowsay', |
1971 | 1970 | 'parameters' => array( |
1972 | 1971 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
1973 | - { |
|
1972 | + { |
|
1974 | 1973 | static $css_added; |
1975 | 1974 | |
1976 | 1975 | if (empty($css_added)) |
@@ -1987,7 +1986,7 @@ discard block |
||
1987 | 1986 | }, |
1988 | 1987 | ), |
1989 | 1988 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
1990 | - { |
|
1989 | + { |
|
1991 | 1990 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
1992 | 1991 | }, |
1993 | 1992 | ), |
@@ -3105,7 +3104,7 @@ discard block |
||
3105 | 3104 | |
3106 | 3105 | // Replace away! |
3107 | 3106 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
3108 | - { |
|
3107 | + { |
|
3109 | 3108 | return $smileyPregReplacements[$matches[1]]; |
3110 | 3109 | }, $message); |
3111 | 3110 | } |
@@ -3892,7 +3891,6 @@ discard block |
||
3892 | 3891 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
3893 | 3892 | $minSeed = $js_file['options']['seed']; |
3894 | 3893 | } |
3895 | - |
|
3896 | 3894 | else |
3897 | 3895 | { |
3898 | 3896 | echo ' |
@@ -6070,7 +6068,6 @@ discard block |
||
6070 | 6068 | $isWritable = true; |
6071 | 6069 | break; |
6072 | 6070 | } |
6073 | - |
|
6074 | 6071 | else |
6075 | 6072 | @chmod($file, $val); |
6076 | 6073 | } |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | { |
392 | 392 | $val = 'CASE '; |
393 | 393 | foreach ($members as $k => $v) |
394 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
394 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
395 | 395 | $val = $val . ' END'; |
396 | 396 | $type = 'raw'; |
397 | 397 | } |
@@ -979,11 +979,11 @@ discard block |
||
979 | 979 | // Anything that isn't a specification, punctuation mark, or whitespace. |
980 | 980 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
981 | 981 | // A series of punctuation marks (except %), possibly separated by whitespace. |
982 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
982 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
983 | 983 | // Unwanted trailing punctuation and whitespace. |
984 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
984 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
985 | 985 | // Unwanted opening punctuation and whitespace. |
986 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
986 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
987 | 987 | ), |
988 | 988 | array( |
989 | 989 | '', |
@@ -1520,7 +1520,7 @@ discard block |
||
1520 | 1520 | 'type' => 'unparsed_commas_content', |
1521 | 1521 | 'test' => '\d+,\d+\]', |
1522 | 1522 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1523 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1523 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1524 | 1524 | { |
1525 | 1525 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1526 | 1526 | if (empty($scheme)) |
@@ -2082,7 +2082,7 @@ discard block |
||
2082 | 2082 | $codes[] = array( |
2083 | 2083 | 'tag' => 'cowsay', |
2084 | 2084 | 'parameters' => array( |
2085 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2085 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2086 | 2086 | { |
2087 | 2087 | static $css_added; |
2088 | 2088 | |
@@ -2099,7 +2099,7 @@ discard block |
||
2099 | 2099 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2100 | 2100 | }, |
2101 | 2101 | ), |
2102 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2102 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2103 | 2103 | { |
2104 | 2104 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2105 | 2105 | }, |
@@ -4070,7 +4070,7 @@ discard block |
||
4070 | 4070 | $toMinify = array(); |
4071 | 4071 | $normal = array(); |
4072 | 4072 | |
4073 | - usort($context['css_files'], function ($a, $b) |
|
4073 | + usort($context['css_files'], function($a, $b) |
|
4074 | 4074 | { |
4075 | 4075 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4076 | 4076 | }); |
@@ -5519,15 +5519,15 @@ discard block |
||
5519 | 5519 | |
5520 | 5520 | // UTF-8 occurences of MS special characters |
5521 | 5521 | $findchars_utf8 = array( |
5522 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5523 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5524 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5525 | - "\xe2\x80\x98", // left single curly quote |
|
5526 | - "\xe2\x80\x99", // right single curly quote |
|
5527 | - "\xe2\x80\x9c", // left double curly quote |
|
5528 | - "\xe2\x80\x9d", // right double curly quote |
|
5529 | - "\xe2\x80\x93", // en dash |
|
5530 | - "\xe2\x80\x94", // em dash |
|
5522 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5523 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5524 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5525 | + "\xe2\x80\x98", // left single curly quote |
|
5526 | + "\xe2\x80\x99", // right single curly quote |
|
5527 | + "\xe2\x80\x9c", // left double curly quote |
|
5528 | + "\xe2\x80\x9d", // right double curly quote |
|
5529 | + "\xe2\x80\x93", // en dash |
|
5530 | + "\xe2\x80\x94", // em dash |
|
5531 | 5531 | ); |
5532 | 5532 | |
5533 | 5533 | // windows 1252 / iso equivalents |
@@ -5545,15 +5545,15 @@ discard block |
||
5545 | 5545 | |
5546 | 5546 | // safe replacements |
5547 | 5547 | $replacechars = array( |
5548 | - ',', // ‚ |
|
5549 | - ',,', // „ |
|
5550 | - '...', // … |
|
5551 | - "'", // ‘ |
|
5552 | - "'", // ’ |
|
5553 | - '"', // “ |
|
5554 | - '"', // ” |
|
5555 | - '-', // – |
|
5556 | - '--', // — |
|
5548 | + ',', // ‚ |
|
5549 | + ',,', // „ |
|
5550 | + '...', // … |
|
5551 | + "'", // ‘ |
|
5552 | + "'", // ’ |
|
5553 | + '"', // “ |
|
5554 | + '"', // ” |
|
5555 | + '-', // – |
|
5556 | + '--', // — |
|
5557 | 5557 | ); |
5558 | 5558 | |
5559 | 5559 | if ($context['utf8']) |
@@ -6683,7 +6683,7 @@ discard block |
||
6683 | 6683 | EXISTS ( |
6684 | 6684 | SELECT bpv.id_board |
6685 | 6685 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6686 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
6686 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
6687 | 6687 | AND bpv.deny = 0 |
6688 | 6688 | AND bpv.id_board = b.id_board |
6689 | 6689 | )'; |
@@ -6693,7 +6693,7 @@ discard block |
||
6693 | 6693 | AND NOT EXISTS ( |
6694 | 6694 | SELECT bpv.id_board |
6695 | 6695 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6696 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
6696 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
6697 | 6697 | AND bpv.deny = 1 |
6698 | 6698 | AND bpv.id_board = b.id_board |
6699 | 6699 | )'; |
@@ -6956,8 +6956,8 @@ discard block |
||
6956 | 6956 | $i = 0; |
6957 | 6957 | while (empty($done)) |
6958 | 6958 | { |
6959 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
6960 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
6959 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
6960 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
6961 | 6961 | else |
6962 | 6962 | $done = true; |
6963 | 6963 | } |
@@ -6967,8 +6967,8 @@ discard block |
||
6967 | 6967 | $i = 0; |
6968 | 6968 | while (empty($done)) |
6969 | 6969 | { |
6970 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
6971 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
6970 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
6971 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
6972 | 6972 | else |
6973 | 6973 | $done = true; |
6974 | 6974 | } |
@@ -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 | } |