@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | display_db_error(); |
76 | 76 | |
77 | 77 | // We need to escape ' and \ |
78 | - $db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd); |
|
78 | + $db_passwd = str_replace(array('\\', '\''), array('\\\\', '\\\''), $db_passwd); |
|
79 | 79 | |
80 | 80 | // Since pg_connect doesn't feed error info to pg_last_error, we have to catch issues with a try/catch. |
81 | 81 | set_error_handler(function($errno, $errstr) { |
82 | - throw new ErrorException($errstr, $errno);}); |
|
82 | + throw new ErrorException($errstr, $errno); }); |
|
83 | 83 | try |
84 | 84 | { |
85 | 85 | if (!empty($db_options['persist'])) |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | if (filter_var($error_array[2], FILTER_VALIDATE_IP) === false) |
939 | 939 | $error_array[2] = null; |
940 | 940 | |
941 | - if(empty($db_persist)) |
|
941 | + if (empty($db_persist)) |
|
942 | 942 | { // without pooling |
943 | 943 | if (empty($pg_error_data_prep)) |
944 | 944 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | 'if (!is_dir(realpath($cachedir)) && is_dir($boarddir . \'/cache\'))', |
847 | 847 | ' $cachedir = $boarddir . \'/cache\';', |
848 | 848 | )), |
849 | - 'search_pattern' => '~\n?(#[^\n]+)?(?:\n\h*if\s*\((?:\!file_exists\(\$(?'.'>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)|\!is_dir\(realpath\(\$(?'.'>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)\))[^;]+\n\h*\$(?'.'>boarddir|sourcedir|tasksdir|packagesdir|cachedir)[^\n]+;)+~sm', |
|
849 | + 'search_pattern' => '~\n?(#[^\n]+)?(?:\n\h*if\s*\((?:\!file_exists\(\$(?' . '>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)|\!is_dir\(realpath\(\$(?' . '>boarddir|sourcedir|tasksdir|packagesdir|cachedir)\)\))[^;]+\n\h*\$(?' . '>boarddir|sourcedir|tasksdir|packagesdir|cachedir)[^\n]+;)+~sm', |
|
850 | 850 | ), |
851 | 851 | 'db_character_set' => array( |
852 | 852 | 'text' => implode("\n", array( |
@@ -945,8 +945,8 @@ discard block |
||
945 | 945 | 'boolean' => '(?i:TRUE|FALSE|(["\']?)[01]\b\\1)', |
946 | 946 | 'NULL' => '(?i:NULL)', |
947 | 947 | // These use a PCRE subroutine to match nested arrays. |
948 | - 'array' => 'array\s*(\((?'.'>[^()]|(?1))*\))', |
|
949 | - 'object' => '\w+::__set_state\(array\s*(\((?'.'>[^()]|(?1))*\))\)', |
|
948 | + 'array' => 'array\s*(\((?' . '>[^()]|(?1))*\))', |
|
949 | + 'object' => '\w+::__set_state\(array\s*(\((?' . '>[^()]|(?1))*\))\)', |
|
950 | 950 | ); |
951 | 951 | |
952 | 952 | /* |
@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | ), |
980 | 980 | // Remove the code that redirects to the installer. |
981 | 981 | $neg_index-- => array( |
982 | - 'search_pattern' => '~^if\s*\(file_exists\(dirname\(__FILE__\)\s*\.\s*\'/install\.php\'\)\)\s*(?:({(?'.'>[^{}]|(?1))*})\h*|header(\((?' . '>[^()]|(?2))*\));\n)~m', |
|
982 | + 'search_pattern' => '~^if\s*\(file_exists\(dirname\(__FILE__\)\s*\.\s*\'/install\.php\'\)\)\s*(?:({(?' . '>[^{}]|(?1))*})\h*|header(\((?' . '>[^()]|(?2))*\));\n)~m', |
|
983 | 983 | 'placeholder' => '', |
984 | 984 | ), |
985 | 985 | ); |
@@ -1742,7 +1742,7 @@ discard block |
||
1742 | 1742 | // Prevents warnings about constants that are already defined. |
1743 | 1743 | $settingsText = preg_replace_callback( |
1744 | 1744 | '~\bdefine\s*\(\s*(["\'])(\w+)\1~', |
1745 | - function ($matches) |
|
1745 | + function($matches) |
|
1746 | 1746 | { |
1747 | 1747 | return 'define(\'' . md5(mt_rand()) . '\''; |
1748 | 1748 | }, |
@@ -1752,7 +1752,7 @@ discard block |
||
1752 | 1752 | // Handle eval errors gracefully in both PHP 5 and PHP 7 |
1753 | 1753 | try |
1754 | 1754 | { |
1755 | - if($settingsText !== '' && @eval($settingsText) === false) |
|
1755 | + if ($settingsText !== '' && @eval($settingsText) === false) |
|
1756 | 1756 | throw new ErrorException('eval error'); |
1757 | 1757 | |
1758 | 1758 | unset($mtime, $settingsFile, $settingsText); |
@@ -1955,7 +1955,7 @@ discard block |
||
1955 | 1955 | } |
1956 | 1956 | |
1957 | 1957 | // Everything is simpler if we convert heredocs to normal strings first. |
1958 | - if (preg_match_all('/<<<(\'?)(\w+)\'?'. $line_ending . '(.*?)'. $line_ending . '\2;$/m', $code_str, $matches)) |
|
1958 | + if (preg_match_all('/<<<(\'?)(\w+)\'?' . $line_ending . '(.*?)' . $line_ending . '\2;$/m', $code_str, $matches)) |
|
1959 | 1959 | { |
1960 | 1960 | foreach ($matches[0] as $mkey => $heredoc) |
1961 | 1961 | { |
@@ -1969,7 +1969,7 @@ discard block |
||
1969 | 1969 | } |
1970 | 1970 | |
1971 | 1971 | // Split before everything that could possibly delimit a comment or a string. |
1972 | - $parts = preg_split('~(?=#+|/(?=/|\*)|\*/|'. $line_ending . '|(?<!\\\)[\'"])~m', $code_str); |
|
1972 | + $parts = preg_split('~(?=#+|/(?=/|\*)|\*/|' . $line_ending . '|(?<!\\\)[\'"])~m', $code_str); |
|
1973 | 1973 | |
1974 | 1974 | $in_string = 0; |
1975 | 1975 | $in_comment = 0; |
@@ -1638,7 +1638,7 @@ |
||
1638 | 1638 | $cacheAPIdir = $sourcedir . '/Cache'; |
1639 | 1639 | |
1640 | 1640 | $loadedApis = array(); |
1641 | - $apis_dir = $cacheAPIdir .'/'. CacheApi::APIS_FOLDER; |
|
1641 | + $apis_dir = $cacheAPIdir . '/' . CacheApi::APIS_FOLDER; |
|
1642 | 1642 | |
1643 | 1643 | $api_classes = new GlobIterator($apis_dir . '/*.php', FilesystemIterator::NEW_CURRENT_AND_KEY); |
1644 | 1644 |
@@ -195,8 +195,7 @@ |
||
195 | 195 | ); |
196 | 196 | |
197 | 197 | $categories[$row_board['id_cat']]['link'] = '<a id="c' . $row_board['id_cat'] . '"></a>' . (!$context['user']['is_guest'] ? |
198 | - '<a href="' . $scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], $row_board['cat_name']) . '">' . $row_board['cat_name'] . '</a>' : |
|
199 | - $row_board['cat_name']); |
|
198 | + '<a href="' . $scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], $row_board['cat_name']) . '">' . $row_board['cat_name'] . '</a>' : $row_board['cat_name']); |
|
200 | 199 | |
201 | 200 | } |
202 | 201 |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | |
852 | 852 | clean_cache('data'); |
853 | 853 | |
854 | - cache_put_data('parsed_boards_descriptions_'. $parsed_boards_cat_id, $already_parsed_boards, 864000); |
|
854 | + cache_put_data('parsed_boards_descriptions_' . $parsed_boards_cat_id, $already_parsed_boards, 864000); |
|
855 | 855 | |
856 | 856 | if (empty($boardOptions['dont_log'])) |
857 | 857 | logAction('edit_board', array('board' => $board_id), 'admin'); |
@@ -1579,7 +1579,7 @@ discard block |
||
1579 | 1579 | $context['description_allowed_tags'] |
1580 | 1580 | ); |
1581 | 1581 | |
1582 | - cache_put_data('parsed_boards_descriptions_'. $category_id, $already_parsed_boards, 864000); |
|
1582 | + cache_put_data('parsed_boards_descriptions_' . $category_id, $already_parsed_boards, 864000); |
|
1583 | 1583 | |
1584 | 1584 | return $already_parsed_boards; |
1585 | 1585 | } |
@@ -455,7 +455,7 @@ |
||
455 | 455 | |
456 | 456 | elseif ($context['uninstalling']) |
457 | 457 | echo ' |
458 | - ', $txt['package_uninstall_done'] .' <br> |
|
458 | + ', $txt['package_uninstall_done'] . ' <br> |
|
459 | 459 | ', '<a href="', $context['keep_url'], '" class="button">', $txt['package_keep'], '</a>', '<a href="', $context['remove_url'], '" class="button">', $txt['package_delete2'], '</a>'; |
460 | 460 | |
461 | 461 | elseif ($context['install_finished']) |
@@ -50,7 +50,7 @@ |
||
50 | 50 | output will be 'Mountain Time (MST/MDT)' for America/Denver vs. |
51 | 51 | 'Mountain Standard Time (MST)' for America/Phoenix. |
52 | 52 | */ |
53 | - $tzid_metazones = array( |
|
53 | + $tzid_metazones = array( |
|
54 | 54 | // Africa_Central (no DST) |
55 | 55 | 'Africa/Maputo' => 'Africa_Central', |
56 | 56 |
@@ -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'; |
@@ -1039,11 +1039,11 @@ discard block |
||
1039 | 1039 | // Anything that isn't a specification, punctuation mark, or whitespace. |
1040 | 1040 | '~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u', |
1041 | 1041 | // A series of punctuation marks (except %), possibly separated by whitespace. |
1042 | - '~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1042 | + '~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u', |
|
1043 | 1043 | // Unwanted trailing punctuation and whitespace. |
1044 | - '~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1044 | + '~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u', |
|
1045 | 1045 | // Unwanted opening punctuation and whitespace. |
1046 | - '~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1046 | + '~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u', |
|
1047 | 1047 | ), |
1048 | 1048 | array( |
1049 | 1049 | '', |
@@ -1462,7 +1462,7 @@ discard block |
||
1462 | 1462 | $width = !empty($width) ? ' width="' . $width . '"' : ''; |
1463 | 1463 | $height = !empty($height) ? ' height="' . $height . '"' : ''; |
1464 | 1464 | |
1465 | - $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>' : ''); |
|
1465 | + $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>' : ''); |
|
1466 | 1466 | } |
1467 | 1467 | // Audio. |
1468 | 1468 | elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0) |
@@ -1470,7 +1470,7 @@ discard block |
||
1470 | 1470 | $width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;'; |
1471 | 1471 | $height = !empty($height) ? 'height: ' . $height . 'px;' : ''; |
1472 | 1472 | |
1473 | - $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>'; |
|
1473 | + $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>'; |
|
1474 | 1474 | } |
1475 | 1475 | // Anything else. |
1476 | 1476 | else |
@@ -1639,7 +1639,7 @@ discard block |
||
1639 | 1639 | 'type' => 'unparsed_commas_content', |
1640 | 1640 | 'test' => '\d+,\d+\]', |
1641 | 1641 | 'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>', |
1642 | - 'validate' => function (&$tag, &$data, $disabled) |
|
1642 | + 'validate' => function(&$tag, &$data, $disabled) |
|
1643 | 1643 | { |
1644 | 1644 | $scheme = parse_url($data[0], PHP_URL_SCHEME); |
1645 | 1645 | if (empty($scheme)) |
@@ -2177,12 +2177,12 @@ discard block |
||
2177 | 2177 | $codes[] = array( |
2178 | 2178 | 'tag' => 'cowsay', |
2179 | 2179 | 'parameters' => array( |
2180 | - 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
|
2180 | + 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc) |
|
2181 | 2181 | { |
2182 | 2182 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2183 | 2183 | }, |
2184 | 2184 | ), |
2185 | - 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
|
2185 | + 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function($tongue) use ($smcFunc) |
|
2186 | 2186 | { |
2187 | 2187 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2188 | 2188 | }, |
@@ -3563,7 +3563,7 @@ discard block |
||
3563 | 3563 | if ($fp != false) |
3564 | 3564 | { |
3565 | 3565 | // Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.) |
3566 | - 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"); |
|
3566 | + 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"); |
|
3567 | 3567 | |
3568 | 3568 | // Read in the HTTP/1.1 or whatever. |
3569 | 3569 | $test = substr(fgets($fp, 11), -1); |
@@ -4167,7 +4167,7 @@ discard block |
||
4167 | 4167 | $toMinify = array(); |
4168 | 4168 | $normal = array(); |
4169 | 4169 | |
4170 | - uasort($context['css_files'], function ($a, $b) |
|
4170 | + uasort($context['css_files'], function($a, $b) |
|
4171 | 4171 | { |
4172 | 4172 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
4173 | 4173 | }); |
@@ -5464,7 +5464,7 @@ discard block |
||
5464 | 5464 | { |
5465 | 5465 | fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n"); |
5466 | 5466 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5467 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5467 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5468 | 5468 | if ($keep_alive) |
5469 | 5469 | fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n"); |
5470 | 5470 | else |
@@ -5474,7 +5474,7 @@ discard block |
||
5474 | 5474 | { |
5475 | 5475 | fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n"); |
5476 | 5476 | fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n"); |
5477 | - fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n"); |
|
5477 | + fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n"); |
|
5478 | 5478 | if ($keep_alive) |
5479 | 5479 | fwrite($fp, 'connection: Keep-Alive' . "\r\n"); |
5480 | 5480 | else |
@@ -5722,13 +5722,13 @@ discard block |
||
5722 | 5722 | |
5723 | 5723 | // UTF-8 occurences of MS special characters |
5724 | 5724 | $findchars_utf8 = array( |
5725 | - "\xe2\x80\x9a", // single low-9 quotation mark |
|
5726 | - "\xe2\x80\x9e", // double low-9 quotation mark |
|
5727 | - "\xe2\x80\xa6", // horizontal ellipsis |
|
5728 | - "\xe2\x80\x98", // left single curly quote |
|
5729 | - "\xe2\x80\x99", // right single curly quote |
|
5730 | - "\xe2\x80\x9c", // left double curly quote |
|
5731 | - "\xe2\x80\x9d", // right double curly quote |
|
5725 | + "\xe2\x80\x9a", // single low-9 quotation mark |
|
5726 | + "\xe2\x80\x9e", // double low-9 quotation mark |
|
5727 | + "\xe2\x80\xa6", // horizontal ellipsis |
|
5728 | + "\xe2\x80\x98", // left single curly quote |
|
5729 | + "\xe2\x80\x99", // right single curly quote |
|
5730 | + "\xe2\x80\x9c", // left double curly quote |
|
5731 | + "\xe2\x80\x9d", // right double curly quote |
|
5732 | 5732 | ); |
5733 | 5733 | |
5734 | 5734 | // windows 1252 / iso equivalents |
@@ -5744,13 +5744,13 @@ discard block |
||
5744 | 5744 | |
5745 | 5745 | // safe replacements |
5746 | 5746 | $replacechars = array( |
5747 | - ',', // ‚ |
|
5748 | - ',,', // „ |
|
5749 | - '...', // … |
|
5750 | - "'", // ‘ |
|
5751 | - "'", // ’ |
|
5752 | - '"', // “ |
|
5753 | - '"', // ” |
|
5747 | + ',', // ‚ |
|
5748 | + ',,', // „ |
|
5749 | + '...', // … |
|
5750 | + "'", // ‘ |
|
5751 | + "'", // ’ |
|
5752 | + '"', // “ |
|
5753 | + '"', // ” |
|
5754 | 5754 | ); |
5755 | 5755 | |
5756 | 5756 | if ($context['utf8']) |
@@ -6090,7 +6090,7 @@ discard block |
||
6090 | 6090 | $desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : ''); |
6091 | 6091 | |
6092 | 6092 | // We don't want abbreviations like '+03' or '-11'. |
6093 | - $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) { |
|
6093 | + $abbrs = array_filter($tzvalue['abbrs'], function($abbr) { |
|
6094 | 6094 | return !strspn($abbr, '+-'); |
6095 | 6095 | }); |
6096 | 6096 | $abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array(); |
@@ -7054,7 +7054,7 @@ discard block |
||
7054 | 7054 | EXISTS ( |
7055 | 7055 | SELECT bpv.id_board |
7056 | 7056 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7057 | - WHERE bpv.id_group IN ('. implode(',', $groups) .') |
|
7057 | + WHERE bpv.id_group IN ('. implode(',', $groups) . ') |
|
7058 | 7058 | AND bpv.deny = 0 |
7059 | 7059 | AND bpv.id_board = b.id_board |
7060 | 7060 | )'; |
@@ -7064,7 +7064,7 @@ discard block |
||
7064 | 7064 | AND NOT EXISTS ( |
7065 | 7065 | SELECT bpv.id_board |
7066 | 7066 | FROM ' . $db_prefix . 'board_permissions_view AS bpv |
7067 | - WHERE bpv.id_group IN ( '. implode(',', $groups) .') |
|
7067 | + WHERE bpv.id_group IN ( '. implode(',', $groups) . ') |
|
7068 | 7068 | AND bpv.deny = 1 |
7069 | 7069 | AND bpv.id_board = b.id_board |
7070 | 7070 | )'; |
@@ -7335,8 +7335,8 @@ discard block |
||
7335 | 7335 | $i = 0; |
7336 | 7336 | while (empty($done)) |
7337 | 7337 | { |
7338 | - if (strpos($format, '{'. --$i . '}') !== false) |
|
7339 | - $replacements['{'. $i . '}'] = array_pop($list); |
|
7338 | + if (strpos($format, '{' . --$i . '}') !== false) |
|
7339 | + $replacements['{' . $i . '}'] = array_pop($list); |
|
7340 | 7340 | else |
7341 | 7341 | $done = true; |
7342 | 7342 | } |
@@ -7346,8 +7346,8 @@ discard block |
||
7346 | 7346 | $i = 0; |
7347 | 7347 | while (empty($done)) |
7348 | 7348 | { |
7349 | - if (strpos($format, '{'. ++$i . '}') !== false) |
|
7350 | - $replacements['{'. $i . '}'] = array_shift($list); |
|
7349 | + if (strpos($format, '{' . ++$i . '}') !== false) |
|
7350 | + $replacements['{' . $i . '}'] = array_shift($list); |
|
7351 | 7351 | else |
7352 | 7352 | $done = true; |
7353 | 7353 | } |
@@ -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, |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | call_integration_hook('integrate_fetch_alerts', array(&$alerts, &$formats)); |
360 | 360 | |
361 | 361 | // Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.) |
362 | - $formats = array_map(function ($format) use ($scripturl) { |
|
362 | + $formats = array_map(function($format) use ($scripturl) { |
|
363 | 363 | $format['link'] = str_replace('{scripturl}', $scripturl, $format['link']); |
364 | 364 | $format['text'] = str_replace('{scripturl}', $scripturl, $format['text']); |
365 | 365 | |
@@ -1166,20 +1166,20 @@ discard block |
||
1166 | 1166 | $context['posts'][$key]['quickbuttons'] = array( |
1167 | 1167 | 'reply' => array( |
1168 | 1168 | 'label' => $txt['reply'], |
1169 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
1169 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
1170 | 1170 | 'icon' => 'reply_button', |
1171 | 1171 | 'show' => $post['can_reply'] |
1172 | 1172 | ), |
1173 | 1173 | 'quote' => array( |
1174 | 1174 | 'label' => $txt['quote_action'], |
1175 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
1175 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
1176 | 1176 | 'icon' => 'quote', |
1177 | 1177 | 'show' => $post['can_quote'] |
1178 | 1178 | ), |
1179 | 1179 | 'remove' => array( |
1180 | 1180 | 'label' => $txt['remove'], |
1181 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
1182 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'"', |
|
1181 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
1182 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '"', |
|
1183 | 1183 | 'class' => 'you_sure', |
1184 | 1184 | 'icon' => 'remove_button', |
1185 | 1185 | 'show' => $post['can_delete'] |