@@ -1661,14 +1661,14 @@ discard block |
||
| 1661 | 1661 | $output['quickbuttons'] = array( |
| 1662 | 1662 | 'quote' => array( |
| 1663 | 1663 | 'label' => $txt['quote_action'], |
| 1664 | - 'href' => $scripturl.'?action=post;quote='.$output['id'].';topic='.$context['current_topic'], '.'.$context['start'].';last_msg='.$context['topic_last_message'], |
|
| 1665 | - 'javascript' => 'onclick="return oQuickReply.quote('.$output['id'].');"', |
|
| 1664 | + 'href' => $scripturl . '?action=post;quote=' . $output['id'] . ';topic=' . $context['current_topic'], '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], |
|
| 1665 | + 'javascript' => 'onclick="return oQuickReply.quote(' . $output['id'] . ');"', |
|
| 1666 | 1666 | 'icon' => 'quote', |
| 1667 | 1667 | 'show' => $context['can_quote'] |
| 1668 | 1668 | ), |
| 1669 | 1669 | 'quote_selected' => array( |
| 1670 | 1670 | 'label' => $txt['quote_selected_action'], |
| 1671 | - 'id' => 'quoteSelected_'. $output['id'], |
|
| 1671 | + 'id' => 'quoteSelected_' . $output['id'], |
|
| 1672 | 1672 | 'href' => 'javascript:void(0)', |
| 1673 | 1673 | 'custom' => 'style="display:none"', |
| 1674 | 1674 | 'icon' => 'quote_selected', |
@@ -1677,71 +1677,71 @@ discard block |
||
| 1677 | 1677 | 'quick_edit' => array( |
| 1678 | 1678 | 'label' => $txt['quick_edit'], |
| 1679 | 1679 | 'class' => 'quick_edit', |
| 1680 | - 'id' =>' modify_button_'. $output['id'], |
|
| 1681 | - 'custom' => 'onclick="oQuickModify.modifyMsg(\''.$output['id'].'\', \''.!empty($modSettings['toggle_subject']).'\')"', |
|
| 1680 | + 'id' =>' modify_button_' . $output['id'], |
|
| 1681 | + 'custom' => 'onclick="oQuickModify.modifyMsg(\'' . $output['id'] . '\', \'' . !empty($modSettings['toggle_subject']) . '\')"', |
|
| 1682 | 1682 | 'icon' => 'quick_edit_button', |
| 1683 | 1683 | 'show' => $output['can_modify'] |
| 1684 | 1684 | ), |
| 1685 | 1685 | 'more' => array( |
| 1686 | 1686 | 'modify' => array( |
| 1687 | 1687 | 'label' => $txt['modify'], |
| 1688 | - 'href' => $scripturl.'?action=post;msg='.$output['id'].';topic='.$context['current_topic'].'.'.$context['start'], |
|
| 1688 | + 'href' => $scripturl . '?action=post;msg=' . $output['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'], |
|
| 1689 | 1689 | 'icon' => 'modify_button', |
| 1690 | 1690 | 'show' => $output['can_modify'] |
| 1691 | 1691 | ), |
| 1692 | 1692 | 'remove_topic' => array( |
| 1693 | 1693 | 'label' => $txt['remove_topic'], |
| 1694 | - 'href' => $scripturl.'?action=removetopic2;topic='.$context['current_topic'].'.'.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1695 | - 'javascript' => 'data-confirm="'.$txt['are_sure_remove_topic'].'" class="you_sure"', |
|
| 1694 | + 'href' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1695 | + 'javascript' => 'data-confirm="' . $txt['are_sure_remove_topic'] . '" class="you_sure"', |
|
| 1696 | 1696 | 'icon' => 'remove_button', |
| 1697 | 1697 | 'show' => $context['can_delete'] && ($context['topic_first_message'] == $output['id']) |
| 1698 | 1698 | ), |
| 1699 | 1699 | 'remove' => array( |
| 1700 | 1700 | 'label' => $txt['remove'], |
| 1701 | - 'href' => $scripturl.'?action=deletemsg;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1702 | - 'javascript' => 'data-confirm="'.$txt['remove_message_question'].'" class="you_sure"', |
|
| 1701 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1702 | + 'javascript' => 'data-confirm="' . $txt['remove_message_question'] . '" class="you_sure"', |
|
| 1703 | 1703 | 'icon' => 'remove_button', |
| 1704 | 1704 | 'show' => $output['can_remove'] && ($context['topic_first_message'] != $output['id']) |
| 1705 | 1705 | ), |
| 1706 | 1706 | 'split' => array( |
| 1707 | 1707 | 'label' => $txt['split'], |
| 1708 | - 'href' => $scripturl.'?action=splittopics;topic='.$context['current_topic'].'.0;at='.$output['id'], |
|
| 1708 | + 'href' => $scripturl . '?action=splittopics;topic=' . $context['current_topic'] . '.0;at=' . $output['id'], |
|
| 1709 | 1709 | 'icon' => 'split_button', |
| 1710 | 1710 | 'show' => $context['can_split'] && !empty($context['real_num_replies']) |
| 1711 | 1711 | ), |
| 1712 | 1712 | 'report' => array( |
| 1713 | 1713 | 'label' => $txt['report_to_mod'], |
| 1714 | - 'href' => $scripturl.'?action=reporttm;topic='.$context['current_topic'].'.'.$output['counter'].';msg='.$output['id'], |
|
| 1714 | + 'href' => $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $output['counter'] . ';msg=' . $output['id'], |
|
| 1715 | 1715 | 'icon' => 'error', |
| 1716 | 1716 | 'show' => $context['can_report_moderator'] |
| 1717 | 1717 | ), |
| 1718 | 1718 | 'warn' => array( |
| 1719 | 1719 | 'label' => $txt['issue_warning'], |
| 1720 | - 'href' => $scripturl, '?action=profile;area=issuewarning;u='.$output['member']['id'].';msg='.$output['id'], |
|
| 1720 | + 'href' => $scripturl, '?action=profile;area=issuewarning;u=' . $output['member']['id'] . ';msg=' . $output['id'], |
|
| 1721 | 1721 | 'icon' => 'warn_button', |
| 1722 | 1722 | 'show' => $context['can_issue_warning'] && !$output['is_message_author'] && !$output['member']['is_guest'] |
| 1723 | 1723 | ), |
| 1724 | 1724 | 'restore' => array( |
| 1725 | 1725 | 'label' => $txt['restore_message'], |
| 1726 | - 'href' => $scripturl.'?action=restoretopic;msgs='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1726 | + 'href' => $scripturl . '?action=restoretopic;msgs=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1727 | 1727 | 'icon' => 'restore_button', |
| 1728 | 1728 | 'show' => $context['can_restore_msg'] |
| 1729 | 1729 | ), |
| 1730 | 1730 | 'approve' => array( |
| 1731 | 1731 | 'label' => $txt['approve'], |
| 1732 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1732 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1733 | 1733 | 'icon' => 'approve_button', |
| 1734 | 1734 | 'show' => $output['can_approve'] |
| 1735 | 1735 | ), |
| 1736 | 1736 | 'unapprove' => array( |
| 1737 | 1737 | 'label' => $txt['unapprove'], |
| 1738 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1738 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1739 | 1739 | 'icon' => 'unapprove_button', |
| 1740 | 1740 | 'show' => $output['can_unapprove'] |
| 1741 | 1741 | ), |
| 1742 | 1742 | ), |
| 1743 | 1743 | 'quickmod' => array( |
| 1744 | - 'id' => 'in_topic_mod_check_'. $output['id'], |
|
| 1744 | + 'id' => 'in_topic_mod_check_' . $output['id'], |
|
| 1745 | 1745 | 'custom' => 'style="display: none;"', |
| 1746 | 1746 | 'content' => '', |
| 1747 | 1747 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $output['can_remove'], |
@@ -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 | ) |
@@ -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 | } |
@@ -7082,32 +7082,32 @@ discard block |
||
| 7082 | 7082 | */ |
| 7083 | 7083 | function truncate_array($array, $max_length = 1900, $deep = 3) |
| 7084 | 7084 | { |
| 7085 | - $array = (array) $array; |
|
| 7085 | + $array = (array) $array; |
|
| 7086 | 7086 | |
| 7087 | - $curr_length = array_length($array, $deep); |
|
| 7087 | + $curr_length = array_length($array, $deep); |
|
| 7088 | 7088 | |
| 7089 | - if ($curr_length <= $max_length) |
|
| 7090 | - return $array; |
|
| 7089 | + if ($curr_length <= $max_length) |
|
| 7090 | + return $array; |
|
| 7091 | 7091 | |
| 7092 | - else |
|
| 7093 | - { |
|
| 7094 | - // Truncate each element's value to a reasonable length |
|
| 7095 | - $param_max = floor($max_length / count($array)); |
|
| 7092 | + else |
|
| 7093 | + { |
|
| 7094 | + // Truncate each element's value to a reasonable length |
|
| 7095 | + $param_max = floor($max_length / count($array)); |
|
| 7096 | 7096 | |
| 7097 | - $current_deep = $deep - 1; |
|
| 7097 | + $current_deep = $deep - 1; |
|
| 7098 | 7098 | |
| 7099 | - foreach ($array as $key => &$value) |
|
| 7100 | - { |
|
| 7101 | - if (is_array($value)) |
|
| 7102 | - if ($current_deep > 0) |
|
| 7103 | - $value = truncate_array($value, $current_deep); |
|
| 7099 | + foreach ($array as $key => &$value) |
|
| 7100 | + { |
|
| 7101 | + if (is_array($value)) |
|
| 7102 | + if ($current_deep > 0) |
|
| 7103 | + $value = truncate_array($value, $current_deep); |
|
| 7104 | 7104 | |
| 7105 | - else |
|
| 7106 | - $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7107 | - } |
|
| 7105 | + else |
|
| 7106 | + $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7107 | + } |
|
| 7108 | 7108 | |
| 7109 | - return $array; |
|
| 7110 | - } |
|
| 7109 | + return $array; |
|
| 7110 | + } |
|
| 7111 | 7111 | } |
| 7112 | 7112 | |
| 7113 | 7113 | /** |
@@ -7118,29 +7118,29 @@ discard block |
||
| 7118 | 7118 | */ |
| 7119 | 7119 | function array_length($array, $deep = 3) |
| 7120 | 7120 | { |
| 7121 | - // Work with arrays |
|
| 7122 | - $array = (array) $array; |
|
| 7123 | - $length = 0; |
|
| 7121 | + // Work with arrays |
|
| 7122 | + $array = (array) $array; |
|
| 7123 | + $length = 0; |
|
| 7124 | 7124 | |
| 7125 | - $deep_count = $deep - 1; |
|
| 7125 | + $deep_count = $deep - 1; |
|
| 7126 | 7126 | |
| 7127 | - foreach ($array as $value) |
|
| 7128 | - { |
|
| 7129 | - // Recursive? |
|
| 7130 | - if (is_array($value)) |
|
| 7131 | - { |
|
| 7132 | - // No can't do |
|
| 7133 | - if ($deep_count <= 0) |
|
| 7134 | - continue; |
|
| 7127 | + foreach ($array as $value) |
|
| 7128 | + { |
|
| 7129 | + // Recursive? |
|
| 7130 | + if (is_array($value)) |
|
| 7131 | + { |
|
| 7132 | + // No can't do |
|
| 7133 | + if ($deep_count <= 0) |
|
| 7134 | + continue; |
|
| 7135 | 7135 | |
| 7136 | - $length += array_length($value, $deep_count); |
|
| 7137 | - } |
|
| 7136 | + $length += array_length($value, $deep_count); |
|
| 7137 | + } |
|
| 7138 | 7138 | |
| 7139 | - else |
|
| 7140 | - $length += strlen($value); |
|
| 7141 | - } |
|
| 7139 | + else |
|
| 7140 | + $length += strlen($value); |
|
| 7141 | + } |
|
| 7142 | 7142 | |
| 7143 | - return $length; |
|
| 7143 | + return $length; |
|
| 7144 | 7144 | } |
| 7145 | 7145 | |
| 7146 | 7146 | ?> |
| 7147 | 7147 | \ No newline at end of file |
@@ -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 | |
@@ -2156,7 +2155,7 @@ discard block |
||
| 2156 | 2155 | 'tag' => 'cowsay', |
| 2157 | 2156 | 'parameters' => array( |
| 2158 | 2157 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
| 2159 | - { |
|
| 2158 | + { |
|
| 2160 | 2159 | static $css_added; |
| 2161 | 2160 | |
| 2162 | 2161 | if (empty($css_added)) |
@@ -2173,7 +2172,7 @@ discard block |
||
| 2173 | 2172 | }, |
| 2174 | 2173 | ), |
| 2175 | 2174 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
| 2176 | - { |
|
| 2175 | + { |
|
| 2177 | 2176 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2178 | 2177 | }, |
| 2179 | 2178 | ), |
@@ -3280,7 +3279,7 @@ discard block |
||
| 3280 | 3279 | |
| 3281 | 3280 | // Replace away! |
| 3282 | 3281 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
| 3283 | - { |
|
| 3282 | + { |
|
| 3284 | 3283 | return $smileyPregReplacements[$matches[1]]; |
| 3285 | 3284 | }, $message); |
| 3286 | 3285 | } |
@@ -4067,7 +4066,6 @@ discard block |
||
| 4067 | 4066 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
| 4068 | 4067 | $minSeed = $js_file['options']['seed']; |
| 4069 | 4068 | } |
| 4070 | - |
|
| 4071 | 4069 | else |
| 4072 | 4070 | { |
| 4073 | 4071 | echo ' |
@@ -6255,7 +6253,6 @@ discard block |
||
| 6255 | 6253 | $isWritable = true; |
| 6256 | 6254 | break; |
| 6257 | 6255 | } |
| 6258 | - |
|
| 6259 | 6256 | else |
| 6260 | 6257 | @chmod($file, $val); |
| 6261 | 6258 | } |
@@ -7135,7 +7132,6 @@ discard block |
||
| 7135 | 7132 | |
| 7136 | 7133 | $length += array_length($value, $deep_count); |
| 7137 | 7134 | } |
| 7138 | - |
|
| 7139 | 7135 | else |
| 7140 | 7136 | $length += strlen($value); |
| 7141 | 7137 | } |
@@ -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 | } |