@@ -93,14 +93,14 @@ discard block |
||
93 | 93 | ), |
94 | 94 | 'ignore' => array( |
95 | 95 | 'label' => $report['ignore'] ? $txt['mc_reportedp_unignore'] : $txt['mc_reportedp_ignore'], |
96 | - 'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;ignore='.(int)!$report['ignore'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'], |
|
96 | + 'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;ignore=' . (int) !$report['ignore'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'], |
|
97 | 97 | 'javascript' => !$report['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '', |
98 | 98 | 'class' => 'you_sure', |
99 | 99 | 'icon' => 'ignore' |
100 | 100 | ), |
101 | 101 | 'close' => array( |
102 | 102 | 'label' => $context['view_closed'] ? $txt['mc_reportedp_open'] : $txt['mc_reportedp_close'], |
103 | - 'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;closed='.(int)!$report['closed'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'], |
|
103 | + 'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;closed=' . (int) !$report['closed'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'], |
|
104 | 104 | 'icon' => $context['view_closed'] ? 'folder' : 'close', |
105 | 105 | ), |
106 | 106 | ); |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | if ($context['report_type'] == 'posts') |
110 | 110 | $context['reports'][$key]['quickbuttons']['delete'] = array( |
111 | 111 | 'label' => $txt['mc_reportedp_delete'], |
112 | - 'href' => $scripturl.'?action=deletemsg;topic='.$report['topic']['id'].'.0;msg='.$report['topic']['id_msg'].';modcenter;'.$context['session_var'].'='.$context['session_id'], |
|
113 | - 'javascript' => 'data-confirm="'.$txt['mc_reportedp_delete_confirm'].'"', |
|
112 | + 'href' => $scripturl . '?action=deletemsg;topic=' . $report['topic']['id'] . '.0;msg=' . $report['topic']['id_msg'] . ';modcenter;' . $context['session_var'] . '=' . $context['session_id'], |
|
113 | + 'javascript' => 'data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '"', |
|
114 | 114 | 'class' => 'you_sure', |
115 | 115 | 'icon' => 'delete', |
116 | 116 | 'show' => !$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards'])) |
@@ -118,9 +118,9 @@ discard block |
||
118 | 118 | |
119 | 119 | // Ban reported member/post author link |
120 | 120 | if ($context['report_type'] == 'members') |
121 | - $ban_link = $scripturl.'?action=admin;area=ban;sa=add;u='.$report['user']['id'].';'.$context['session_var'].'='.$context['session_id']; |
|
121 | + $ban_link = $scripturl . '?action=admin;area=ban;sa=add;u=' . $report['user']['id'] . ';' . $context['session_var'] . '=' . $context['session_id']; |
|
122 | 122 | else |
123 | - $ban_link = $scripturl.'?action=admin;area=ban;sa=add'.(!empty($report['author']['id']) ? ';u='.$report['author']['id'] : ';msg='.$report['topic']['id_msg']).';'.$context['session_var'].'='.$context['session_id']; |
|
123 | + $ban_link = $scripturl . '?action=admin;area=ban;sa=add' . (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']) . ';' . $context['session_var'] . '=' . $context['session_id']; |
|
124 | 124 | |
125 | 125 | $context['reports'][$key]['quickbuttons'] += array( |
126 | 126 | 'ban' => array( |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | 'show' => !$report['closed'] && !empty($context['report_manage_bans']) && ($context['report_type'] == 'posts' || $context['report_type'] == 'members' && !empty($report['user']['id'])) |
131 | 131 | ), |
132 | 132 | 'quickmod' => array( |
133 | - 'content' => '<input type="checkbox" name="close[]" value="'.$report['id'].'">', |
|
133 | + 'content' => '<input type="checkbox" name="close[]" value="' . $report['id'] . '">', |
|
134 | 134 | 'show' => !$context['view_closed'] |
135 | 135 | ) |
136 | 136 | ); |
@@ -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'], |
@@ -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 | } |
@@ -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 | } |
@@ -3862,7 +3862,7 @@ |
||
3862 | 3862 | $auth_secret = hash_file('sha256', $boarddir . '/Settings.php'); |
3863 | 3863 | |
3864 | 3864 | // Set the last error to now, but only every 15 minutes. Don't need to flood the logs. |
3865 | - if (empty($db_last_error) || ($db_last_error + 60*15) <= time()) |
|
3865 | + if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time()) |
|
3866 | 3866 | { |
3867 | 3867 | updateDbLastError(time()); |
3868 | 3868 | loadLanguage('Errors'); |