@@ -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, |
@@ -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 | }); |
@@ -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}', |
@@ -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 | } |
@@ -467,20 +467,20 @@ |
||
| 467 | 467 | $context['posts'][$key]['quickbuttons'] = array( |
| 468 | 468 | 'reply' => array( |
| 469 | 469 | 'label' => $txt['reply'], |
| 470 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
| 470 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
| 471 | 471 | 'icon' => 'reply_button', |
| 472 | 472 | 'show' => $post['can_reply'] |
| 473 | 473 | ), |
| 474 | 474 | 'quote' => array( |
| 475 | 475 | 'label' => $txt['quote_action'], |
| 476 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
| 476 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
| 477 | 477 | 'icon' => 'quote', |
| 478 | 478 | 'show' => $post['can_quote'] |
| 479 | 479 | ), |
| 480 | 480 | 'delete' => array( |
| 481 | 481 | 'label' => $txt['remove'], |
| 482 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';recent;'.$context['session_var'].'='.$context['session_id'], |
|
| 483 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'"', |
|
| 482 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';recent;' . $context['session_var'] . '=' . $context['session_id'], |
|
| 483 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '"', |
|
| 484 | 484 | 'class' => 'you_sure', |
| 485 | 485 | 'icon' => 'remove_button', |
| 486 | 486 | 'show' => $post['can_delete'] |
@@ -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 | { |
@@ -393,17 +393,17 @@ discard block |
||
| 393 | 393 | $quickbuttons = array( |
| 394 | 394 | 'approve' => array( |
| 395 | 395 | 'label' => $txt['approve'], |
| 396 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';approve='.$item['id'], |
|
| 396 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';approve=' . $item['id'], |
|
| 397 | 397 | 'icon' => 'approve', |
| 398 | 398 | ), |
| 399 | 399 | 'delete' => array( |
| 400 | 400 | 'label' => $txt['remove'], |
| 401 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';delete='.$item['id'], |
|
| 401 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';delete=' . $item['id'], |
|
| 402 | 402 | 'icon' => 'remove_button', |
| 403 | 403 | 'show' => $item['can_delete'] |
| 404 | 404 | ), |
| 405 | 405 | 'quickmod' => array( |
| 406 | - 'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>', |
|
| 406 | + 'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>', |
|
| 407 | 407 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 |
| 408 | 408 | ), |
| 409 | 409 | ); |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | $quickbuttons = array( |
| 469 | 469 | 'delete' => array( |
| 470 | 470 | 'label' => $txt['remove_message'], |
| 471 | - 'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 471 | + 'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 472 | 472 | 'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '"', |
| 473 | 473 | 'class' => 'you_sure', |
| 474 | 474 | 'icon' => 'remove_button', |