Completed
Push — release-2.1 ( 98f663...40d439 )
by Jon
42s queued 21s
created
Sources/MessageIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -340,7 +340,7 @@
 block discarded – undo
340 340
 		WHERE t.id_board = {int:current_board} '
341 341
 			. (!$modSettings['postmod_active'] || $context['can_approve_posts'] ? '' : '
342 342
 			AND (t.approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR t.id_member_started = {int:current_member}') . ')') . (!empty($message_index_topic_wheres) ? '
343
-			AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : ''). '
343
+			AND ' . implode("\n\t\t\t\tAND ", $message_index_topic_wheres) : '') . '
344 344
 		ORDER BY is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' . $_REQUEST['sort'] . ($ascending ? '' : ' DESC') . '
345 345
 		LIMIT {int:maxindex}
346 346
 			OFFSET {int:start} ';
Please login to merge, or discard this patch.
Sources/News.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,
@@ -2127,7 +2127,7 @@  discard block
 block discarded – undo
2127 2127
 			m.id_msg, m.id_topic, m.id_board, m.id_member, m.poster_email, m.poster_ip,
2128 2128
 			m.poster_time, m.subject, m.modified_time, m.modified_name, m.modified_reason, m.body,
2129 2129
 			m.likes, m.approved, m.smileys_enabled
2130
-		FROM {db_prefix}messages AS m' . ($modSettings['postmod_active'] && !$show_all ?'
2130
+		FROM {db_prefix}messages AS m' . ($modSettings['postmod_active'] && !$show_all ? '
2131 2131
 			INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)' : '') . '
2132 2132
 		WHERE m.id_member = {int:uid}
2133 2133
 			AND m.id_msg > {int:start_after}
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2202,7 +2202,7 @@
 block discarded – undo
2202 2202
 					function($a, $b)
2203 2203
 					{
2204 2204
 						if ($a['filesize'] == $b['filesize'])
2205
-					        return 0;
2205
+							return 0;
2206 2206
 
2207 2207
 						return ($a['filesize'] < $b['filesize']) ? -1 : 1;
2208 2208
 					}
Please login to merge, or discard this patch.
Sources/tasks/ExportProfileData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 		$feed_meta = array(
205 205
 			'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']),
206 206
 			'desc' => sentence_list(array_map(
207
-				function ($datatype) use ($txt)
207
+				function($datatype) use ($txt)
208 208
 				{
209 209
 					return $txt[$datatype];
210 210
 				},
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
 					'src' => 'src="' . $currentAttachment['href'] . '" onerror="$(\'.dlattach_' . $currentAttachment['id'] . '\').show(); $(\'.dlattach_' . $currentAttachment['id'] . '\').css({\'position\': \'absolute\'});"',
727 727
 				),
728 728
 				$returnContext
729
-			) . $hidden_orig_link . '</span>' ;
729
+			) . $hidden_orig_link . '</span>';
730 730
 		}
731 731
 		elseif (strpos($currentAttachment['mime_type'], 'video/') === 0)
732 732
 		{
Please login to merge, or discard this patch.
Sources/Post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1277,7 +1277,7 @@
 block discarded – undo
1277 1277
 	if ($context['can_post_attachment'])
1278 1278
 	{
1279 1279
 		$acceptedFiles = empty($context['allowed_extensions']) ? '' : implode(',', array_map(
1280
-			function ($val) use ($smcFunc)
1280
+			function($val) use ($smcFunc)
1281 1281
 			{
1282 1282
 				return !empty($val) ? ('.' . $smcFunc['htmltrim']($val)) : '';
1283 1283
 			},
Please login to merge, or discard this patch.
Sources/Profile-Export.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
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 471
 	$included_desc = array_map(
472
-		function ($datatype) use ($txt)
472
+		function($datatype) use ($txt)
473 473
 		{
474 474
 			return $txt[$datatype];
475 475
 		},
@@ -789,9 +789,9 @@  discard block
 block discarded – undo
789 789
 	$xslt_variables = array();
790 790
 
791 791
 	// Do not change any of these to HTTPS URLs. For explanation, see comments in the buildXmlFeed() function.
792
-	$smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/profile';
793
-	$xslt_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/XSL/Transform';
794
-	$html_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/xhtml';
792
+	$smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/profile';
793
+	$xslt_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/XSL/Transform';
794
+	$html_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/xhtml';
795 795
 
796 796
 	require_once($sourcedir . DIRECTORY_SEPARATOR . 'News.php');
797 797
 
@@ -1696,14 +1696,14 @@  discard block
 block discarded – undo
1696 1696
 
1697 1697
 		if (!empty($context['export_css_header']))
1698 1698
 		{
1699
-			$stylesheet['css_js'] .=  '
1699
+			$stylesheet['css_js'] .= '
1700 1700
 			<style><![CDATA[' . "\n" . implode("\n", $context['export_css_header']) . "\n" . ']]>
1701 1701
 			</style>';
1702 1702
 		}
1703 1703
 
1704 1704
 		if (!empty($context['export_javascript_vars']))
1705 1705
 		{
1706
-			$stylesheet['css_js'] .=  '
1706
+			$stylesheet['css_js'] .= '
1707 1707
 			<script><![CDATA[';
1708 1708
 
1709 1709
 			foreach ($context['export_javascript_vars'] as $var => $val)
@@ -1739,7 +1739,7 @@  discard block
 block discarded – undo
1739 1739
 
1740 1740
 		if (!empty($context['export_javascript_inline']['standard']))
1741 1741
 		{
1742
-			$stylesheet['css_js'] .=  '
1742
+			$stylesheet['css_js'] .= '
1743 1743
 			<script><![CDATA[' . "\n" . implode("\n", $context['export_javascript_inline']['standard']) . "\n" . ']]>
1744 1744
 			</script>';
1745 1745
 		}
@@ -1751,7 +1751,7 @@  discard block
 block discarded – undo
1751 1751
 
1752 1752
 			$stylesheet['css_js'] .= "\n\t" . str_replace("\n", "\n\t", implode("\n", $context['export_javascript_inline']['defer']));
1753 1753
 
1754
-			$stylesheet['css_js'] .= "\n" . '});'. "\n" . ']]>
1754
+			$stylesheet['css_js'] .= "\n" . '});' . "\n" . ']]>
1755 1755
 			</script>';
1756 1756
 		}
1757 1757
 
@@ -1834,7 +1834,7 @@  discard block
 block discarded – undo
1834 1834
 
1835 1835
 	usort(
1836 1836
 		$context['css_files'],
1837
-		function ($a, $b)
1837
+		function($a, $b)
1838 1838
 		{
1839 1839
 			return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
1840 1840
 		}
Please login to merge, or discard this patch.
Sources/Subs-Timezones.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1716,7 +1716,7 @@
 block discarded – undo
1716 1716
 		{
1717 1717
 			usort(
1718 1718
 				$fallbacks[$tzid],
1719
-				function ($a, $b)
1719
+				function($a, $b)
1720 1720
 				{
1721 1721
 					return $a['ts'] > $b['ts'];
1722 1722
 				}
Please login to merge, or discard this patch.
Sources/ManagePermissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1840,7 +1840,7 @@
 block discarded – undo
1840 1840
 		// Make sure this is an array of integers
1841 1841
 		$excluded_groups = array_filter(
1842 1842
 			(array) $excluded_groups,
1843
-			function ($v)
1843
+			function($v)
1844 1844
 			{
1845 1845
 				return is_int($v) || is_string($v) && (string) intval($v) === $v;
1846 1846
 			}
Please login to merge, or discard this patch.
Sources/Subs.php 2 patches
Braces   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -280,7 +280,6 @@  discard block
 block discarded – undo
280 280
 		$condition = 'id_member IN ({array_int:members})';
281 281
 		$parameters['members'] = $members;
282 282
 	}
283
-
284 283
 	elseif ($members === null)
285 284
 		$condition = '1=1';
286 285
 
@@ -383,11 +382,9 @@  discard block
 block discarded – undo
383 382
 				$val = $val . ' END';
384 383
 				$type = 'raw';
385 384
 			}
386
-
387 385
 			else
388 386
 				$val = alert_count($members, true);
389 387
 		}
390
-
391 388
 		elseif ($type == 'int' && ($val === '+' || $val === '-'))
392 389
 		{
393 390
 			$val = $var . ' ' . $val . ' 1';
@@ -2167,12 +2164,12 @@  discard block
 block discarded – undo
2167 2164
 			'tag' => 'cowsay',
2168 2165
 			'parameters' => array(
2169 2166
 				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2170
-					{
2167
+				{
2171 2168
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2172 2169
 					},
2173 2170
 				),
2174 2171
 				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2175
-					{
2172
+				{
2176 2173
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2177 2174
 					},
2178 2175
 				),
@@ -2500,7 +2497,8 @@  discard block
 block discarded – undo
2500 2497
 
2501 2498
 							foreach (array('path', 'query', 'fragment') as $part)
2502 2499
 							{
2503
-								switch ($part) {
2500
+								switch ($part)
2501
+								{
2504 2502
 									case 'path':
2505 2503
 										$part_disallowed_chars = '\h\v<>' . $bracket_quote_chars . $excluded_trailing_chars . '/#&';
2506 2504
 										$part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars);
@@ -2817,7 +2815,9 @@  discard block
 block discarded – undo
2817 2815
 			$look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2));
2818 2816
 
2819 2817
 			// A closing tag that doesn't match any open tags? Skip it.
2820
-			if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags)))
2818
+			if (!in_array($look_for, array_map(function($code)
2819
+			{
2820
+return $code['tag']; }, $open_tags)))
2821 2821
 				continue;
2822 2822
 
2823 2823
 			$to_close = array();
@@ -4357,7 +4357,6 @@  discard block
 block discarded – undo
4357 4357
 				if (!isset($minSeed) && isset($js_file['options']['seed']))
4358 4358
 					$minSeed = $js_file['options']['seed'];
4359 4359
 			}
4360
-
4361 4360
 			else
4362 4361
 			{
4363 4362
 				echo '
@@ -6287,7 +6286,8 @@  discard block
 block discarded – undo
6287 6286
 			$zones[$tzkey]['tzid'] = $tzid;
6288 6287
 			$zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0);
6289 6288
 
6290
-			foreach ($tzinfo as $transition) {
6289
+			foreach ($tzinfo as $transition)
6290
+			{
6291 6291
 				$zones[$tzkey]['abbrs'][] = $transition['abbr'];
6292 6292
 			}
6293 6293
 
@@ -6791,7 +6791,6 @@  discard block
 block discarded – undo
6791 6791
 			$isWritable = true;
6792 6792
 			break;
6793 6793
 		}
6794
-
6795 6794
 		else
6796 6795
 			@chmod($file, $val);
6797 6796
 	}
@@ -7880,7 +7879,8 @@  discard block
 block discarded – undo
7880 7879
 	$replaceWith = array();
7881 7880
 
7882 7881
 	if (!empty($matches[1]))
7883
-		foreach ($matches[1] as $token) {
7882
+		foreach ($matches[1] as $token)
7883
+		{
7884 7884
 			$toFind[] = '{' . $token . '}';
7885 7885
 			$replaceWith[] = isset($txt[$token]) ? $txt[$token] : $token;
7886 7886
 		}
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 			{
379 379
 				$val = 'CASE ';
380 380
 				foreach ($members as $k => $v)
381
-					$val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' ';
381
+					$val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' ';
382 382
 
383 383
 				$val = $val . ' END';
384 384
 				$type = 'raw';
@@ -868,11 +868,11 @@  discard block
 block discarded – undo
868 868
 			// Anything that isn't a specification, punctuation mark, or whitespace.
869 869
 			'~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u',
870 870
 			// A series of punctuation marks (except %), possibly separated by whitespace.
871
-			'~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u',
871
+			'~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u',
872 872
 			// Unwanted trailing punctuation and whitespace.
873
-			'~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
873
+			'~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
874 874
 			// Unwanted opening punctuation and whitespace.
875
-			'~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
875
+			'~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
876 876
 		),
877 877
 		array(
878 878
 			'',
@@ -1175,7 +1175,7 @@  discard block
 block discarded – undo
1175 1175
 	{
1176 1176
 		$dates[$tzid . '_' . $timestamp]['results'][$format] = preg_replace_callback(
1177 1177
 			'/\xEE\x84\xA0([\d_]+)(\xEE\x84(?:[\xA1-\xAF]))/',
1178
-			function ($matches)
1178
+			function($matches)
1179 1179
 			{
1180 1180
 				switch ($matches[2])
1181 1181
 				{
@@ -1309,7 +1309,7 @@  discard block
 block discarded – undo
1309 1309
 	elseif (!empty($context['character_set']) && is_callable('mb_decode_numericentity'))
1310 1310
 	{
1311 1311
 		// Get whatever the default replacement character is for this encoding.
1312
-		$substitute = mb_decode_numericentity('&#xFFFD;', array(0xFFFD,0xFFFD,0,0xFFFF), $context['character_set']);
1312
+		$substitute = mb_decode_numericentity('&#xFFFD;', array(0xFFFD, 0xFFFD, 0, 0xFFFF), $context['character_set']);
1313 1313
 	}
1314 1314
 	else
1315 1315
 		$substitute = '?';
@@ -1794,7 +1794,7 @@  discard block
 block discarded – undo
1794 1794
 								$returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">';
1795 1795
 							else
1796 1796
 							{
1797
-								$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': '';
1797
+								$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : '';
1798 1798
 								$height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : '';
1799 1799
 								$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>';
1800 1800
 							}
@@ -1805,7 +1805,7 @@  discard block
 block discarded – undo
1805 1805
 							$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : '';
1806 1806
 							$height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : '';
1807 1807
 
1808
-							$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>' : '');
1808
+							$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>' : '');
1809 1809
 						}
1810 1810
 						// Audio.
1811 1811
 						elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0)
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
 							$width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;';
1814 1814
 							$height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : '';
1815 1815
 
1816
-							$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>';
1816
+							$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>';
1817 1817
 						}
1818 1818
 						// Anything else.
1819 1819
 						else
@@ -1982,7 +1982,7 @@  discard block
 block discarded – undo
1982 1982
 				'type' => 'unparsed_commas_content',
1983 1983
 				'test' => '\d+,\d+\]',
1984 1984
 				'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>',
1985
-				'validate' => function (&$tag, &$data, $disabled)
1985
+				'validate' => function(&$tag, &$data, $disabled)
1986 1986
 				{
1987 1987
 					$data[0] = normalize_iri($data[0]);
1988 1988
 
@@ -2108,8 +2108,8 @@  discard block
 block discarded – undo
2108 2108
 					else
2109 2109
 						$url = get_proxied_url($url);
2110 2110
 
2111
-					$alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""';
2112
-					$title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : '';
2111
+					$alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""';
2112
+					$title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : '';
2113 2113
 
2114 2114
 					$data = isset($disabled[$tag['tag']]) ? $url : '<img src="' . $url . '"' . $alt . $title . $params['{width}'] . $params['{height}'] . ' class="bbc_img' . (!empty($params['{width}']) || !empty($params['{height}']) ? ' resized' : '') . '" loading="lazy">';
2115 2115
 				},
@@ -2540,12 +2540,12 @@  discard block
 block discarded – undo
2540 2540
 		$codes[] = array(
2541 2541
 			'tag' => 'cowsay',
2542 2542
 			'parameters' => array(
2543
-				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2543
+				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc)
2544 2544
 					{
2545 2545
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2546 2546
 					},
2547 2547
 				),
2548
-				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2548
+				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function($tongue) use ($smcFunc)
2549 2549
 					{
2550 2550
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2551 2551
 					},
@@ -4250,7 +4250,7 @@  discard block
 block discarded – undo
4250 4250
 		if ($fp != false)
4251 4251
 		{
4252 4252
 			// Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.)
4253
-			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");
4253
+			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");
4254 4254
 
4255 4255
 			// Read in the HTTP/1.1 or whatever.
4256 4256
 			$test = substr(fgets($fp, 11), -1);
@@ -4846,7 +4846,7 @@  discard block
 block discarded – undo
4846 4846
 
4847 4847
 	uasort(
4848 4848
 		$context['css_files'],
4849
-		function ($a, $b)
4849
+		function($a, $b)
4850 4850
 		{
4851 4851
 			return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
4852 4852
 		}
@@ -6143,7 +6143,7 @@  discard block
 block discarded – undo
6143 6143
 			{
6144 6144
 				fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n");
6145 6145
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
6146
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
6146
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
6147 6147
 				if ($keep_alive)
6148 6148
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n");
6149 6149
 				else
@@ -6153,7 +6153,7 @@  discard block
 block discarded – undo
6153 6153
 			{
6154 6154
 				fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n");
6155 6155
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
6156
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
6156
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
6157 6157
 				if ($keep_alive)
6158 6158
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n");
6159 6159
 				else
@@ -6402,13 +6402,13 @@  discard block
 block discarded – undo
6402 6402
 
6403 6403
 	// UTF-8 occurences of MS special characters
6404 6404
 	$findchars_utf8 = array(
6405
-		"\xe2\x80\x9a",	// single low-9 quotation mark
6406
-		"\xe2\x80\x9e",	// double low-9 quotation mark
6407
-		"\xe2\x80\xa6",	// horizontal ellipsis
6408
-		"\xe2\x80\x98",	// left single curly quote
6409
-		"\xe2\x80\x99",	// right single curly quote
6410
-		"\xe2\x80\x9c",	// left double curly quote
6411
-		"\xe2\x80\x9d",	// right double curly quote
6405
+		"\xe2\x80\x9a", // single low-9 quotation mark
6406
+		"\xe2\x80\x9e", // double low-9 quotation mark
6407
+		"\xe2\x80\xa6", // horizontal ellipsis
6408
+		"\xe2\x80\x98", // left single curly quote
6409
+		"\xe2\x80\x99", // right single curly quote
6410
+		"\xe2\x80\x9c", // left double curly quote
6411
+		"\xe2\x80\x9d", // right double curly quote
6412 6412
 	);
6413 6413
 
6414 6414
 	// windows 1252 / iso equivalents
@@ -6424,13 +6424,13 @@  discard block
 block discarded – undo
6424 6424
 
6425 6425
 	// safe replacements
6426 6426
 	$replacechars = array(
6427
-		',',	// &sbquo;
6428
-		',,',	// &bdquo;
6429
-		'...',	// &hellip;
6430
-		"'",	// &lsquo;
6431
-		"'",	// &rsquo;
6432
-		'"',	// &ldquo;
6433
-		'"',	// &rdquo;
6427
+		',', // &sbquo;
6428
+		',,', // &bdquo;
6429
+		'...', // &hellip;
6430
+		"'", // &lsquo;
6431
+		"'", // &rsquo;
6432
+		'"', // &ldquo;
6433
+		'"', // &rdquo;
6434 6434
 	);
6435 6435
 
6436 6436
 	if ($context['utf8'])
@@ -6791,7 +6791,7 @@  discard block
 block discarded – undo
6791 6791
 		// We don't want abbreviations like '+03' or '-11'.
6792 6792
 		$abbrs = array_filter(
6793 6793
 			$tzvalue['abbrs'],
6794
-			function ($abbr)
6794
+			function($abbr)
6795 6795
 			{
6796 6796
 				return !strspn($abbr, '+-');
6797 6797
 			}
@@ -7780,7 +7780,7 @@  discard block
 block discarded – undo
7780 7780
 			EXISTS (
7781 7781
 				SELECT bpv.id_board
7782 7782
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7783
-				WHERE bpv.id_group IN ('. implode(',', $groups) .')
7783
+				WHERE bpv.id_group IN ('. implode(',', $groups) . ')
7784 7784
 					AND bpv.deny = 0
7785 7785
 					AND bpv.id_board = b.id_board
7786 7786
 			)';
@@ -7790,7 +7790,7 @@  discard block
 block discarded – undo
7790 7790
 			AND NOT EXISTS (
7791 7791
 				SELECT bpv.id_board
7792 7792
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7793
-				WHERE bpv.id_group IN ( '. implode(',', $groups) .')
7793
+				WHERE bpv.id_group IN ( '. implode(',', $groups) . ')
7794 7794
 					AND bpv.deny = 1
7795 7795
 					AND bpv.id_board = b.id_board
7796 7796
 			)';
@@ -8197,8 +8197,8 @@  discard block
 block discarded – undo
8197 8197
 	$i = 0;
8198 8198
 	while (empty($done))
8199 8199
 	{
8200
-		if (strpos($format, '{'. --$i . '}') !== false)
8201
-			$replacements['{'. $i . '}'] = array_pop($list);
8200
+		if (strpos($format, '{' . --$i . '}') !== false)
8201
+			$replacements['{' . $i . '}'] = array_pop($list);
8202 8202
 		else
8203 8203
 			$done = true;
8204 8204
 	}
@@ -8208,8 +8208,8 @@  discard block
 block discarded – undo
8208 8208
 	$i = 0;
8209 8209
 	while (empty($done))
8210 8210
 	{
8211
-		if (strpos($format, '{'. ++$i . '}') !== false)
8212
-			$replacements['{'. $i . '}'] = array_shift($list);
8211
+		if (strpos($format, '{' . ++$i . '}') !== false)
8212
+			$replacements['{' . $i . '}'] = array_shift($list);
8213 8213
 		else
8214 8214
 			$done = true;
8215 8215
 	}
@@ -8387,7 +8387,7 @@  discard block
 block discarded – undo
8387 8387
 	if (empty($stringSubject))
8388 8388
 		return '';
8389 8389
 
8390
-	$translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches);
8390
+	$translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches);
8391 8391
 	$toFind = array();
8392 8392
 	$replaceWith = array();
8393 8393
 
Please login to merge, or discard this patch.
Sources/Mentions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@
 block discarded – undo
256 256
 			return array();
257 257
 
258 258
 		// preparse code does a few things which might mess with our parsing
259
-		$body = htmlspecialchars_decode(preg_replace('~<br\s*/?'.'>~', "\n", str_replace('&nbsp;', ' ', $body)), ENT_QUOTES);
259
+		$body = htmlspecialchars_decode(preg_replace('~<br\s*/?' . '>~', "\n", str_replace('&nbsp;', ' ', $body)), ENT_QUOTES);
260 260
 
261 261
 		if (empty(self::$excluded_bbc_regex))
262 262
 			self::setExcludedBbcRegex();
Please login to merge, or discard this patch.