@@ -1655,14 +1655,14 @@ discard block |
||
1655 | 1655 | $output['quickbuttons'] = array( |
1656 | 1656 | 'quote' => array( |
1657 | 1657 | 'label' => $txt['quote_action'], |
1658 | - 'href' => $scripturl.'?action=post;quote='.$output['id'].';topic='.$context['current_topic'], '.'.$context['start'].';last_msg='.$context['topic_last_message'], |
|
1659 | - 'javascript' => 'onclick="return oQuickReply.quote('.$output['id'].');"', |
|
1658 | + 'href' => $scripturl . '?action=post;quote=' . $output['id'] . ';topic=' . $context['current_topic'], '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'], |
|
1659 | + 'javascript' => 'onclick="return oQuickReply.quote(' . $output['id'] . ');"', |
|
1660 | 1660 | 'icon' => 'quote', |
1661 | 1661 | 'show' => $context['can_quote'] |
1662 | 1662 | ), |
1663 | 1663 | 'quote_selected' => array( |
1664 | 1664 | 'label' => $txt['quote_selected_action'], |
1665 | - 'id' => 'quoteSelected_'. $output['id'], |
|
1665 | + 'id' => 'quoteSelected_' . $output['id'], |
|
1666 | 1666 | 'href' => 'javascript:void(0)', |
1667 | 1667 | 'custom' => 'style="display:none"', |
1668 | 1668 | 'icon' => 'quote_selected', |
@@ -1671,73 +1671,73 @@ discard block |
||
1671 | 1671 | 'quick_edit' => array( |
1672 | 1672 | 'label' => $txt['quick_edit'], |
1673 | 1673 | 'class' => 'quick_edit', |
1674 | - 'id' =>' modify_button_'. $output['id'], |
|
1675 | - 'custom' => 'onclick="oQuickModify.modifyMsg(\''.$output['id'].'\', \''.!empty($modSettings['toggle_subject']).'\')"', |
|
1674 | + 'id' =>' modify_button_' . $output['id'], |
|
1675 | + 'custom' => 'onclick="oQuickModify.modifyMsg(\'' . $output['id'] . '\', \'' . !empty($modSettings['toggle_subject']) . '\')"', |
|
1676 | 1676 | 'icon' => 'quick_edit_button', |
1677 | 1677 | 'show' => $output['can_modify'] |
1678 | 1678 | ), |
1679 | 1679 | 'more' => array( |
1680 | 1680 | 'modify' => array( |
1681 | 1681 | 'label' => $txt['modify'], |
1682 | - 'href' => $scripturl.'?action=post;msg='.$output['id'].';topic='.$context['current_topic'].'.'.$context['start'], |
|
1682 | + 'href' => $scripturl . '?action=post;msg=' . $output['id'] . ';topic=' . $context['current_topic'] . '.' . $context['start'], |
|
1683 | 1683 | 'icon' => 'modify_button', |
1684 | 1684 | 'show' => $output['can_modify'] |
1685 | 1685 | ), |
1686 | 1686 | 'remove_topic' => array( |
1687 | 1687 | 'label' => $txt['remove_topic'], |
1688 | - 'href' => $scripturl.'?action=removetopic2;topic='.$context['current_topic'].'.'.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
1689 | - 'javascript' => 'data-confirm="'.$txt['are_sure_remove_topic'].'"', |
|
1688 | + 'href' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1689 | + 'javascript' => 'data-confirm="' . $txt['are_sure_remove_topic'] . '"', |
|
1690 | 1690 | 'class' => 'you_sure', |
1691 | 1691 | 'icon' => 'remove_button', |
1692 | 1692 | 'show' => $context['can_delete'] && ($context['topic_first_message'] == $output['id']) |
1693 | 1693 | ), |
1694 | 1694 | 'remove' => array( |
1695 | 1695 | 'label' => $txt['remove'], |
1696 | - 'href' => $scripturl.'?action=deletemsg;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
1697 | - 'javascript' => 'data-confirm="'.$txt['remove_message_question'].'"', |
|
1696 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1697 | + 'javascript' => 'data-confirm="' . $txt['remove_message_question'] . '"', |
|
1698 | 1698 | 'class' => 'you_sure', |
1699 | 1699 | 'icon' => 'remove_button', |
1700 | 1700 | 'show' => $output['can_remove'] && ($context['topic_first_message'] != $output['id']) |
1701 | 1701 | ), |
1702 | 1702 | 'split' => array( |
1703 | 1703 | 'label' => $txt['split'], |
1704 | - 'href' => $scripturl.'?action=splittopics;topic='.$context['current_topic'].'.0;at='.$output['id'], |
|
1704 | + 'href' => $scripturl . '?action=splittopics;topic=' . $context['current_topic'] . '.0;at=' . $output['id'], |
|
1705 | 1705 | 'icon' => 'split_button', |
1706 | 1706 | 'show' => $context['can_split'] && !empty($context['real_num_replies']) |
1707 | 1707 | ), |
1708 | 1708 | 'report' => array( |
1709 | 1709 | 'label' => $txt['report_to_mod'], |
1710 | - 'href' => $scripturl.'?action=reporttm;topic='.$context['current_topic'].'.'.$output['counter'].';msg='.$output['id'], |
|
1710 | + 'href' => $scripturl . '?action=reporttm;topic=' . $context['current_topic'] . '.' . $output['counter'] . ';msg=' . $output['id'], |
|
1711 | 1711 | 'icon' => 'error', |
1712 | 1712 | 'show' => $context['can_report_moderator'] |
1713 | 1713 | ), |
1714 | 1714 | 'warn' => array( |
1715 | 1715 | 'label' => $txt['issue_warning'], |
1716 | - 'href' => $scripturl.'?action=profile;area=issuewarning;u='.$output['member']['id'].';msg='.$output['id'], |
|
1716 | + 'href' => $scripturl . '?action=profile;area=issuewarning;u=' . $output['member']['id'] . ';msg=' . $output['id'], |
|
1717 | 1717 | 'icon' => 'warn_button', |
1718 | 1718 | 'show' => $context['can_issue_warning'] && !$output['is_message_author'] && !$output['member']['is_guest'] |
1719 | 1719 | ), |
1720 | 1720 | 'restore' => array( |
1721 | 1721 | 'label' => $txt['restore_message'], |
1722 | - 'href' => $scripturl.'?action=restoretopic;msgs='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
1722 | + 'href' => $scripturl . '?action=restoretopic;msgs=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1723 | 1723 | 'icon' => 'restore_button', |
1724 | 1724 | 'show' => $context['can_restore_msg'] |
1725 | 1725 | ), |
1726 | 1726 | 'approve' => array( |
1727 | 1727 | 'label' => $txt['approve'], |
1728 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
1728 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1729 | 1729 | 'icon' => 'approve_button', |
1730 | 1730 | 'show' => $output['can_approve'] |
1731 | 1731 | ), |
1732 | 1732 | 'unapprove' => array( |
1733 | 1733 | 'label' => $txt['unapprove'], |
1734 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa=approve;topic='.$context['current_topic'].'.'.$context['start'].';msg='.$output['id'].';'.$context['session_var'].'='.$context['session_id'], |
|
1734 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=approve;topic=' . $context['current_topic'] . '.' . $context['start'] . ';msg=' . $output['id'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1735 | 1735 | 'icon' => 'unapprove_button', |
1736 | 1736 | 'show' => $output['can_unapprove'] |
1737 | 1737 | ), |
1738 | 1738 | ), |
1739 | 1739 | 'quickmod' => array( |
1740 | - 'id' => 'in_topic_mod_check_'. $output['id'], |
|
1740 | + 'id' => 'in_topic_mod_check_' . $output['id'], |
|
1741 | 1741 | 'custom' => 'style="display: none;"', |
1742 | 1742 | 'content' => '', |
1743 | 1743 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 && $output['can_remove'], |
@@ -2169,7 +2169,7 @@ |
||
2169 | 2169 | { |
2170 | 2170 | uasort($loaded_attachments, function($a, $b) { |
2171 | 2171 | if ($a['filesize'] == $b['filesize']) |
2172 | - return 0; |
|
2172 | + return 0; |
|
2173 | 2173 | return ($a['filesize'] < $b['filesize']) ? -1 : 1; |
2174 | 2174 | }); |
2175 | 2175 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | ); |
92 | 92 | foreach (array('action', 'sa', 'type', 'board', 'boards', 'c', 'u', 'limit', 'offset') as $var) |
93 | 93 | if (isset($_GET[$var])) |
94 | - $feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';' ) . $var . '=' . $_GET[$var]; |
|
94 | + $feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';') . $var . '=' . $_GET[$var]; |
|
95 | 95 | |
96 | 96 | // Handle the cases where a board, boards, or category is asked for. |
97 | 97 | $query_this_board = 1; |
@@ -303,17 +303,17 @@ discard block |
||
303 | 303 | * namespaces, which could cause it to mangle the XML horrifically |
304 | 304 | * during processing. |
305 | 305 | */ |
306 | - $smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/' . $subaction; |
|
306 | + $smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/' . $subaction; |
|
307 | 307 | |
308 | 308 | // Allow mods to add extra namespaces and tags to the feed/channel |
309 | 309 | $namespaces = array( |
310 | 310 | 'rss' => array(), |
311 | - 'rss2' => array('atom' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'), |
|
312 | - 'atom' => array('' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'), |
|
311 | + 'rss2' => array('atom' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'), |
|
312 | + 'atom' => array('' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'), |
|
313 | 313 | 'rdf' => array( |
314 | - '' => 'htt'.'p:/'.'/purl.o'.'rg/rss/1.0/', |
|
315 | - 'rdf' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/02/22-rdf-syntax-ns#', |
|
316 | - 'dc' => 'htt'.'p:/'.'/purl.o'.'rg/dc/elements/1.1/', |
|
314 | + '' => 'htt' . 'p:/' . '/purl.o' . 'rg/rss/1.0/', |
|
315 | + 'rdf' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/02/22-rdf-syntax-ns#', |
|
316 | + 'dc' => 'htt' . 'p:/' . '/purl.o' . 'rg/dc/elements/1.1/', |
|
317 | 317 | ), |
318 | 318 | 'smf' => array( |
319 | 319 | 'smf' => $smf_ns, |
@@ -2167,7 +2167,8 @@ |
||
2167 | 2167 | // Sort the attachments by size to make things easier below |
2168 | 2168 | if (!empty($loaded_attachments)) |
2169 | 2169 | { |
2170 | - uasort($loaded_attachments, function($a, $b) { |
|
2170 | + uasort($loaded_attachments, function($a, $b) |
|
2171 | + { |
|
2171 | 2172 | if ($a['filesize'] == $b['filesize']) |
2172 | 2173 | return 0; |
2173 | 2174 | return ($a['filesize'] < $b['filesize']) ? -1 : 1; |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | |
469 | 469 | // Figure out the filename we'll tell the browser. |
470 | 470 | $datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile'); |
471 | - $included_desc = array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes); |
|
471 | + $included_desc = array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes); |
|
472 | 472 | |
473 | 473 | $dlfilename = array_merge(array($context['forum_name'], $context['member']['username']), $included_desc); |
474 | 474 | $dlfilename = preg_replace('/[^\p{L}\p{M}\p{N}_]+/u', '-', str_replace('"', '', un_htmlspecialchars(strip_tags(implode('_', $dlfilename))))); |
@@ -783,9 +783,9 @@ discard block |
||
783 | 783 | $xslt_variables = array(); |
784 | 784 | |
785 | 785 | // Do not change any of these to HTTPS URLs. For explanation, see comments in the buildXmlFeed() function. |
786 | - $smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/profile'; |
|
787 | - $xslt_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/XSL/Transform'; |
|
788 | - $html_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/xhtml'; |
|
786 | + $smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/profile'; |
|
787 | + $xslt_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/XSL/Transform'; |
|
788 | + $html_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/xhtml'; |
|
789 | 789 | |
790 | 790 | require_once($sourcedir . DIRECTORY_SEPARATOR . 'News.php'); |
791 | 791 | |
@@ -1690,14 +1690,14 @@ discard block |
||
1690 | 1690 | |
1691 | 1691 | if (!empty($context['export_css_header'])) |
1692 | 1692 | { |
1693 | - $stylesheet['css_js'] .= ' |
|
1693 | + $stylesheet['css_js'] .= ' |
|
1694 | 1694 | <style><![CDATA[' . "\n" . implode("\n", $context['export_css_header']) . "\n" . ']]> |
1695 | 1695 | </style>'; |
1696 | 1696 | } |
1697 | 1697 | |
1698 | 1698 | if (!empty($context['export_javascript_vars'])) |
1699 | 1699 | { |
1700 | - $stylesheet['css_js'] .= ' |
|
1700 | + $stylesheet['css_js'] .= ' |
|
1701 | 1701 | <script><![CDATA['; |
1702 | 1702 | |
1703 | 1703 | foreach ($context['export_javascript_vars'] as $var => $val) |
@@ -1733,7 +1733,7 @@ discard block |
||
1733 | 1733 | |
1734 | 1734 | if (!empty($context['export_javascript_inline']['standard'])) |
1735 | 1735 | { |
1736 | - $stylesheet['css_js'] .= ' |
|
1736 | + $stylesheet['css_js'] .= ' |
|
1737 | 1737 | <script><![CDATA[' . "\n" . implode("\n", $context['export_javascript_inline']['standard']) . "\n" . ']]> |
1738 | 1738 | </script>'; |
1739 | 1739 | } |
@@ -1745,7 +1745,7 @@ discard block |
||
1745 | 1745 | |
1746 | 1746 | $stylesheet['css_js'] .= "\n\t" . str_replace("\n", "\n\t", implode("\n", $context['export_javascript_inline']['defer'])); |
1747 | 1747 | |
1748 | - $stylesheet['css_js'] .= "\n" . '});'. "\n" . ']]> |
|
1748 | + $stylesheet['css_js'] .= "\n" . '});' . "\n" . ']]> |
|
1749 | 1749 | </script>'; |
1750 | 1750 | } |
1751 | 1751 | |
@@ -1826,7 +1826,7 @@ discard block |
||
1826 | 1826 | $css_to_minify = array(); |
1827 | 1827 | $normal_css_files = array(); |
1828 | 1828 | |
1829 | - usort($context['css_files'], function ($a, $b) |
|
1829 | + usort($context['css_files'], function($a, $b) |
|
1830 | 1830 | { |
1831 | 1831 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
1832 | 1832 | }); |
@@ -468,7 +468,9 @@ |
||
468 | 468 | |
469 | 469 | // Figure out the filename we'll tell the browser. |
470 | 470 | $datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile'); |
471 | - $included_desc = array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes); |
|
471 | + $included_desc = array_map(function ($datatype) use ($txt) |
|
472 | + { |
|
473 | +return $txt[$datatype]; }, $datatypes); |
|
472 | 474 | |
473 | 475 | $dlfilename = array_merge(array($context['forum_name'], $context['member']['username']), $included_desc); |
474 | 476 | $dlfilename = preg_replace('/[^\p{L}\p{M}\p{N}_]+/u', '-', str_replace('"', '', un_htmlspecialchars(strip_tags(implode('_', $dlfilename))))); |
@@ -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}', |
@@ -163,7 +163,8 @@ |
||
163 | 163 | else |
164 | 164 | $context['help_text'] = $_GET['help']; |
165 | 165 | |
166 | - switch ($_GET['help']) { |
|
166 | + switch ($_GET['help']) |
|
167 | + { |
|
167 | 168 | case 'cal_short_months': |
168 | 169 | $context['help_text'] = sprintf($context['help_text'], $txt['months_short'][1], $txt['months_titles'][1]); |
169 | 170 | break; |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | { |
378 | 378 | $val = 'CASE '; |
379 | 379 | foreach ($members as $k => $v) |
380 | - $val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' '; |
|
380 | + $val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' '; |
|
381 | 381 | |
382 | 382 | $val = $val . ' END'; |
383 | 383 | $type = 'raw'; |
@@ -1041,11 +1041,11 @@ discard block |
||
1041 | 1041 | // Anything that isn't a specification, punctuation mark, or whitespace. |
1042 | 1042 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
1043 | 1043 | // A series of punctuation marks (except %), possibly separated by whitespace. |
1044 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1044 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1045 | 1045 | // Unwanted trailing punctuation and whitespace. |
1046 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1046 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1047 | 1047 | // Unwanted opening punctuation and whitespace. |
1048 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1048 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1049 | 1049 | ), |
1050 | 1050 | array( |
1051 | 1051 | '', |
@@ -1460,7 +1460,7 @@ discard block |
||
1460 | 1460 | $width = !empty($width) ? ' width="' . $width . '"' : ''; |
1461 | 1461 | $height = !empty($height) ? ' height="' . $height . '"' : ''; |
1462 | 1462 | |
1463 | - $returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
1463 | + $returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : ''); |
|
1464 | 1464 | } |
1465 | 1465 | // Audio. |
1466 | 1466 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1468,7 +1468,7 @@ discard block |
||
1468 | 1468 | $width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
1469 | 1469 | $height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
1470 | 1470 | |
1471 | - $returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="'. $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>'; |
|
1471 | + $returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="' . $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>'; |
|
1472 | 1472 | } |
1473 | 1473 | // Anything else. |
1474 | 1474 | else |
@@ -1637,7 +1637,7 @@ discard block |
||
1637 | 1637 | 'type' => 'unparsed_commas_content', |
1638 | 1638 | 'test' => '\d+,\d+\]', |
1639 | 1639 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1640 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1640 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1641 | 1641 | { |
1642 | 1642 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1643 | 1643 | if (empty($scheme)) |
@@ -2175,12 +2175,12 @@ discard block |
||
2175 | 2175 | $codes[] = array( |
2176 | 2176 | 'tag' => 'cowsay', |
2177 | 2177 | 'parameters' => array( |
2178 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2178 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2179 | 2179 | { |
2180 | 2180 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2181 | 2181 | }, |
2182 | 2182 | ), |
2183 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2183 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2184 | 2184 | { |
2185 | 2185 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2186 | 2186 | }, |
@@ -3552,7 +3552,7 @@ discard block |
||
3552 | 3552 | if ($fp != false) |
3553 | 3553 | { |
3554 | 3554 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3555 | - fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: '. SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n"); |
|
3555 | + fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: ' . SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n"); |
|
3556 | 3556 | |
3557 | 3557 | // Read in the HTTP/1.1 or whatever. |
3558 | 3558 | $test = substr(fgets($fp, 11), -1); |
@@ -4156,7 +4156,7 @@ discard block |
||
4156 | 4156 | $toMinify = array(); |
4157 | 4157 | $normal = array(); |
4158 | 4158 | |
4159 | - uasort($context['css_files'], function ($a, $b) |
|
4159 | + uasort($context['css_files'], function($a, $b) |
|
4160 | 4160 | { |
4161 | 4161 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4162 | 4162 | }); |
@@ -5452,7 +5452,7 @@ discard block |
||
5452 | 5452 | { |
5453 | 5453 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5454 | 5454 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5455 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5455 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5456 | 5456 | if ($keep_alive) |
5457 | 5457 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5458 | 5458 | else |
@@ -5462,7 +5462,7 @@ discard block |
||
5462 | 5462 | { |
5463 | 5463 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5464 | 5464 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5465 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5465 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5466 | 5466 | if ($keep_alive) |
5467 | 5467 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5468 | 5468 | else |
@@ -5710,13 +5710,13 @@ discard block |
||
5710 | 5710 | |
5711 | 5711 | // UTF-8 occurences of MS special characters |
5712 | 5712 | $findchars_utf8 = array( |
5713 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5714 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5715 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5716 | - "\xe2\x80\x98", // left single curly quote |
|
5717 | - "\xe2\x80\x99", // right single curly quote |
|
5718 | - "\xe2\x80\x9c", // left double curly quote |
|
5719 | - "\xe2\x80\x9d", // right double curly quote |
|
5713 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5714 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5715 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5716 | + "\xe2\x80\x98", // left single curly quote |
|
5717 | + "\xe2\x80\x99", // right single curly quote |
|
5718 | + "\xe2\x80\x9c", // left double curly quote |
|
5719 | + "\xe2\x80\x9d", // right double curly quote |
|
5720 | 5720 | ); |
5721 | 5721 | |
5722 | 5722 | // windows 1252 / iso equivalents |
@@ -5732,13 +5732,13 @@ discard block |
||
5732 | 5732 | |
5733 | 5733 | // safe replacements |
5734 | 5734 | $replacechars = array( |
5735 | - ',', // ‚ |
|
5736 | - ',,', // „ |
|
5737 | - '...', // … |
|
5738 | - "'", // ‘ |
|
5739 | - "'", // ’ |
|
5740 | - '"', // “ |
|
5741 | - '"', // ” |
|
5735 | + ',', // ‚ |
|
5736 | + ',,', // „ |
|
5737 | + '...', // … |
|
5738 | + "'", // ‘ |
|
5739 | + "'", // ’ |
|
5740 | + '"', // “ |
|
5741 | + '"', // ” |
|
5742 | 5742 | ); |
5743 | 5743 | |
5744 | 5744 | if ($context['utf8']) |
@@ -6923,7 +6923,7 @@ discard block |
||
6923 | 6923 | EXISTS ( |
6924 | 6924 | SELECT bpv.id_board |
6925 | 6925 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6926 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
6926 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
6927 | 6927 | AND bpv.deny = 0 |
6928 | 6928 | AND bpv.id_board = b.id_board |
6929 | 6929 | )'; |
@@ -6933,7 +6933,7 @@ discard block |
||
6933 | 6933 | AND NOT EXISTS ( |
6934 | 6934 | SELECT bpv.id_board |
6935 | 6935 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
6936 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
6936 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
6937 | 6937 | AND bpv.deny = 1 |
6938 | 6938 | AND bpv.id_board = b.id_board |
6939 | 6939 | )'; |
@@ -7204,8 +7204,8 @@ discard block |
||
7204 | 7204 | $i = 0; |
7205 | 7205 | while (empty($done)) |
7206 | 7206 | { |
7207 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7208 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7207 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7208 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7209 | 7209 | else |
7210 | 7210 | $done = true; |
7211 | 7211 | } |
@@ -7215,8 +7215,8 @@ discard block |
||
7215 | 7215 | $i = 0; |
7216 | 7216 | while (empty($done)) |
7217 | 7217 | { |
7218 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7219 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7218 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7219 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7220 | 7220 | else |
7221 | 7221 | $done = true; |
7222 | 7222 | } |
@@ -279,7 +279,6 @@ discard block |
||
279 | 279 | $condition = 'id_member IN ({array_int:members})'; |
280 | 280 | $parameters['members'] = $members; |
281 | 281 | } |
282 | - |
|
283 | 282 | elseif ($members === null) |
284 | 283 | $condition = '1=1'; |
285 | 284 | |
@@ -382,11 +381,9 @@ discard block |
||
382 | 381 | $val = $val . ' END'; |
383 | 382 | $type = 'raw'; |
384 | 383 | } |
385 | - |
|
386 | 384 | else |
387 | 385 | $val = alert_count($members, true); |
388 | 386 | } |
389 | - |
|
390 | 387 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
391 | 388 | { |
392 | 389 | $val = $var . ' ' . $val . ' 1'; |
@@ -2176,12 +2173,12 @@ discard block |
||
2176 | 2173 | 'tag' => 'cowsay', |
2177 | 2174 | 'parameters' => array( |
2178 | 2175 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2179 | - { |
|
2176 | + { |
|
2180 | 2177 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2181 | 2178 | }, |
2182 | 2179 | ), |
2183 | 2180 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2184 | - { |
|
2181 | + { |
|
2185 | 2182 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2186 | 2183 | }, |
2187 | 2184 | ), |
@@ -3279,7 +3276,7 @@ discard block |
||
3279 | 3276 | |
3280 | 3277 | // Replace away! |
3281 | 3278 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
3282 | - { |
|
3279 | + { |
|
3283 | 3280 | return $smileyPregReplacements[$matches[1]]; |
3284 | 3281 | }, $message); |
3285 | 3282 | } |
@@ -4077,7 +4074,6 @@ discard block |
||
4077 | 4074 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4078 | 4075 | $minSeed = $js_file['options']['seed']; |
4079 | 4076 | } |
4080 | - |
|
4081 | 4077 | else |
4082 | 4078 | { |
4083 | 4079 | echo ' |
@@ -6360,7 +6356,6 @@ discard block |
||
6360 | 6356 | $isWritable = true; |
6361 | 6357 | break; |
6362 | 6358 | } |
6363 | - |
|
6364 | 6359 | else |
6365 | 6360 | @chmod($file, $val); |
6366 | 6361 | } |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | AND a.is_read = 0' : '') . (!empty($alertIDs) ? ' |
262 | 262 | AND a.id_alert IN ({array_int:alertIDs})' : '') . ' |
263 | 263 | ORDER BY id_alert DESC' . (!empty($limit) ? ' |
264 | - LIMIT {int:limit}' : '') . (!empty($offset) ?' |
|
264 | + LIMIT {int:limit}' : '') . (!empty($offset) ? ' |
|
265 | 265 | OFFSET {int:offset}' : ''), |
266 | 266 | array( |
267 | 267 | 'id_member' => $memID, |
@@ -1160,20 +1160,20 @@ discard block |
||
1160 | 1160 | $context['posts'][$key]['quickbuttons'] = array( |
1161 | 1161 | 'reply' => array( |
1162 | 1162 | 'label' => $txt['reply'], |
1163 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
1163 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
1164 | 1164 | 'icon' => 'reply_button', |
1165 | 1165 | 'show' => $post['can_reply'] |
1166 | 1166 | ), |
1167 | 1167 | 'quote' => array( |
1168 | 1168 | 'label' => $txt['quote_action'], |
1169 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
1169 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
1170 | 1170 | 'icon' => 'quote', |
1171 | 1171 | 'show' => $post['can_quote'] |
1172 | 1172 | ), |
1173 | 1173 | 'remove' => array( |
1174 | 1174 | 'label' => $txt['remove'], |
1175 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
1176 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'"', |
|
1175 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1176 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '"', |
|
1177 | 1177 | 'class' => 'you_sure', |
1178 | 1178 | 'icon' => 'remove_button', |
1179 | 1179 | 'show' => $post['can_delete'] |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | $feed_meta = array( |
205 | 205 | 'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']), |
206 | - 'desc' => sentence_list(array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))), |
|
206 | + 'desc' => sentence_list(array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))), |
|
207 | 207 | 'author' => $mbname, |
208 | 208 | 'source' => $scripturl . '?action=profile;u=' . $uid, |
209 | 209 | 'self' => '', // Unused, but can't be null. |
@@ -723,7 +723,7 @@ discard block |
||
723 | 723 | 'src' => 'src="' . $currentAttachment['href'] . '" onerror="$(\'.dlattach_' . $currentAttachment['id'] . '\').show(); $(\'.dlattach_' . $currentAttachment['id'] . '\').css({\'position\': \'absolute\'});"', |
724 | 724 | ), |
725 | 725 | $returnContext |
726 | - ) . $hidden_orig_link . '</span>' ; |
|
726 | + ) . $hidden_orig_link . '</span>'; |
|
727 | 727 | } |
728 | 728 | elseif (strpos($currentAttachment['mime_type'], 'video/') === 0) |
729 | 729 | { |
@@ -203,7 +203,9 @@ |
||
203 | 203 | |
204 | 204 | $feed_meta = array( |
205 | 205 | 'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']), |
206 | - 'desc' => sentence_list(array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))), |
|
206 | + 'desc' => sentence_list(array_map(function ($datatype) use ($txt) |
|
207 | + { |
|
208 | +return $txt[$datatype]; }, array_keys($included))), |
|
207 | 209 | 'author' => $mbname, |
208 | 210 | 'source' => $scripturl . '?action=profile;u=' . $uid, |
209 | 211 | 'self' => '', // Unused, but can't be null. |