Completed
Push — release-2.1 ( a15cd1...d4d8de )
by Jeremy
30s queued 22s
created
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.
Themes/default/Admin.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -758,7 +758,7 @@
 block discarded – undo
758 758
 	// Filter out any redundant separators before we start the loop
759 759
 	$context['config_vars'] = array_filter(
760 760
 		$context['config_vars'],
761
-		function ($v) use ($context)
761
+		function($v) use ($context)
762 762
 		{
763 763
 			static $config_vars, $prev;
764 764
 
Please login to merge, or discard this patch.
Themes/default/PersonalMessage.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	global $context, $scripturl, $txt, $settings, $options, $modSettings;
278 278
 
279 279
 	echo '
280
-	<div class="windowbg" id="msg', $message['id'],'">
280
+	<div class="windowbg" id="msg', $message['id'], '">
281 281
 		<div class="post_wrapper">
282 282
 			<div class="poster">';
283 283
 
@@ -1946,7 +1946,7 @@  discard block
 block discarded – undo
1946 1946
 				<div class="floatright smalltext righttext">
1947 1947
 					<div class="recipient_to">&#171;&nbsp;<strong>', $txt['to'], ':</strong> ', implode(', ', $draft['recipients']['to']), '&nbsp;&#187;</div>';
1948 1948
 
1949
-			if(!empty($draft['recipients']['bcc']))
1949
+			if (!empty($draft['recipients']['bcc']))
1950 1950
 				echo'
1951 1951
 					<div class="pm_bbc">&#171;&nbsp;<strong>', $txt['pm_bcc'], ':</strong> ', implode(', ', $draft['recipients']['bcc']), '&nbsp;&#187;</div>';
1952 1952
 
Please login to merge, or discard this patch.
Sources/Subs.php 1 patch
Spacing   +38 added lines, -38 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';
@@ -1045,11 +1045,11 @@  discard block
 block discarded – undo
1045 1045
 			// Anything that isn't a specification, punctuation mark, or whitespace.
1046 1046
 			'~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u',
1047 1047
 			// A series of punctuation marks (except %), possibly separated by whitespace.
1048
-			'~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u',
1048
+			'~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u',
1049 1049
 			// Unwanted trailing punctuation and whitespace.
1050
-			'~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1050
+			'~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1051 1051
 			// Unwanted opening punctuation and whitespace.
1052
-			'~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1052
+			'~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1053 1053
 		),
1054 1054
 		array(
1055 1055
 			'',
@@ -1447,7 +1447,7 @@  discard block
 block discarded – undo
1447 1447
 								$returnContext .= '<img src="' . $currentAttachment['href'] . '"' . $alt . $title . ' class="bbc_img">';
1448 1448
 							else
1449 1449
 							{
1450
-								$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"': '';
1450
+								$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : '';
1451 1451
 								$height = !empty($params['{height}']) ? 'height="' . $params['{height}'] . '"' : '';
1452 1452
 								$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img resized"/>';
1453 1453
 							}
@@ -1458,7 +1458,7 @@  discard block
 block discarded – undo
1458 1458
 							$width = !empty($params['{width}']) ? ' width="' . $params['{width}'] . '"' : '';
1459 1459
 							$height = !empty($params['{height}']) ? ' height="' . $params['{height}'] . '"' : '';
1460 1460
 
1461
-							$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>' : '');
1461
+							$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>' : '');
1462 1462
 						}
1463 1463
 						// Audio.
1464 1464
 						elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0)
@@ -1466,7 +1466,7 @@  discard block
 block discarded – undo
1466 1466
 							$width = 'max-width:100%; width: ' . (!empty($params['{width}']) ? $params['{width}'] : '400') . 'px;';
1467 1467
 							$height = !empty($params['{height}']) ? 'height: ' . $params['{height}'] . 'px;' : '';
1468 1468
 
1469
-							$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>';
1469
+							$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>';
1470 1470
 						}
1471 1471
 						// Anything else.
1472 1472
 						else
@@ -1635,7 +1635,7 @@  discard block
 block discarded – undo
1635 1635
 				'type' => 'unparsed_commas_content',
1636 1636
 				'test' => '\d+,\d+\]',
1637 1637
 				'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>',
1638
-				'validate' => function (&$tag, &$data, $disabled)
1638
+				'validate' => function(&$tag, &$data, $disabled)
1639 1639
 				{
1640 1640
 					$scheme = parse_url($data[0], PHP_URL_SCHEME);
1641 1641
 					if (empty($scheme))
@@ -1748,8 +1748,8 @@  discard block
 block discarded – undo
1748 1748
 					else
1749 1749
 						$url = get_proxied_url($url);
1750 1750
 
1751
-					$alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}']. '"' : ' alt=""';
1752
-					$title = !empty($params['{title}']) ? ' title="' . $params['{title}']. '"' : '';
1751
+					$alt = !empty($params['{alt}']) ? ' alt="' . $params['{alt}'] . '"' : ' alt=""';
1752
+					$title = !empty($params['{title}']) ? ' title="' . $params['{title}'] . '"' : '';
1753 1753
 
1754 1754
 					$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">';
1755 1755
 				},
@@ -2166,12 +2166,12 @@  discard block
 block discarded – undo
2166 2166
 		$codes[] = array(
2167 2167
 			'tag' => 'cowsay',
2168 2168
 			'parameters' => array(
2169
-				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2169
+				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc)
2170 2170
 					{
2171 2171
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2172 2172
 					},
2173 2173
 				),
2174
-				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2174
+				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function($tongue) use ($smcFunc)
2175 2175
 					{
2176 2176
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2177 2177
 					},
@@ -3843,7 +3843,7 @@  discard block
 block discarded – undo
3843 3843
 		if ($fp != false)
3844 3844
 		{
3845 3845
 			// Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.)
3846
-			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");
3846
+			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");
3847 3847
 
3848 3848
 			// Read in the HTTP/1.1 or whatever.
3849 3849
 			$test = substr(fgets($fp, 11), -1);
@@ -4439,7 +4439,7 @@  discard block
 block discarded – undo
4439 4439
 
4440 4440
 	uasort(
4441 4441
 		$context['css_files'],
4442
-		function ($a, $b)
4442
+		function($a, $b)
4443 4443
 		{
4444 4444
 			return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
4445 4445
 		}
@@ -5741,7 +5741,7 @@  discard block
 block discarded – undo
5741 5741
 			{
5742 5742
 				fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n");
5743 5743
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
5744
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
5744
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
5745 5745
 				if ($keep_alive)
5746 5746
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n");
5747 5747
 				else
@@ -5751,7 +5751,7 @@  discard block
 block discarded – undo
5751 5751
 			{
5752 5752
 				fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n");
5753 5753
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
5754
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
5754
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
5755 5755
 				if ($keep_alive)
5756 5756
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n");
5757 5757
 				else
@@ -6000,13 +6000,13 @@  discard block
 block discarded – undo
6000 6000
 
6001 6001
 	// UTF-8 occurences of MS special characters
6002 6002
 	$findchars_utf8 = array(
6003
-		"\xe2\x80\x9a",	// single low-9 quotation mark
6004
-		"\xe2\x80\x9e",	// double low-9 quotation mark
6005
-		"\xe2\x80\xa6",	// horizontal ellipsis
6006
-		"\xe2\x80\x98",	// left single curly quote
6007
-		"\xe2\x80\x99",	// right single curly quote
6008
-		"\xe2\x80\x9c",	// left double curly quote
6009
-		"\xe2\x80\x9d",	// right double curly quote
6003
+		"\xe2\x80\x9a", // single low-9 quotation mark
6004
+		"\xe2\x80\x9e", // double low-9 quotation mark
6005
+		"\xe2\x80\xa6", // horizontal ellipsis
6006
+		"\xe2\x80\x98", // left single curly quote
6007
+		"\xe2\x80\x99", // right single curly quote
6008
+		"\xe2\x80\x9c", // left double curly quote
6009
+		"\xe2\x80\x9d", // right double curly quote
6010 6010
 	);
6011 6011
 
6012 6012
 	// windows 1252 / iso equivalents
@@ -6022,13 +6022,13 @@  discard block
 block discarded – undo
6022 6022
 
6023 6023
 	// safe replacements
6024 6024
 	$replacechars = array(
6025
-		',',	// &sbquo;
6026
-		',,',	// &bdquo;
6027
-		'...',	// &hellip;
6028
-		"'",	// &lsquo;
6029
-		"'",	// &rsquo;
6030
-		'"',	// &ldquo;
6031
-		'"',	// &rdquo;
6025
+		',', // &sbquo;
6026
+		',,', // &bdquo;
6027
+		'...', // &hellip;
6028
+		"'", // &lsquo;
6029
+		"'", // &rsquo;
6030
+		'"', // &ldquo;
6031
+		'"', // &rdquo;
6032 6032
 	);
6033 6033
 
6034 6034
 	if ($context['utf8'])
@@ -6389,7 +6389,7 @@  discard block
 block discarded – undo
6389 6389
 		// We don't want abbreviations like '+03' or '-11'.
6390 6390
 		$abbrs = array_filter(
6391 6391
 			$tzvalue['abbrs'],
6392
-			function ($abbr)
6392
+			function($abbr)
6393 6393
 			{
6394 6394
 				return !strspn($abbr, '+-');
6395 6395
 			}
@@ -7364,7 +7364,7 @@  discard block
 block discarded – undo
7364 7364
 			EXISTS (
7365 7365
 				SELECT bpv.id_board
7366 7366
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7367
-				WHERE bpv.id_group IN ('. implode(',', $groups) .')
7367
+				WHERE bpv.id_group IN ('. implode(',', $groups) . ')
7368 7368
 					AND bpv.deny = 0
7369 7369
 					AND bpv.id_board = b.id_board
7370 7370
 			)';
@@ -7374,7 +7374,7 @@  discard block
 block discarded – undo
7374 7374
 			AND NOT EXISTS (
7375 7375
 				SELECT bpv.id_board
7376 7376
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7377
-				WHERE bpv.id_group IN ( '. implode(',', $groups) .')
7377
+				WHERE bpv.id_group IN ( '. implode(',', $groups) . ')
7378 7378
 					AND bpv.deny = 1
7379 7379
 					AND bpv.id_board = b.id_board
7380 7380
 			)';
@@ -7686,8 +7686,8 @@  discard block
 block discarded – undo
7686 7686
 	$i = 0;
7687 7687
 	while (empty($done))
7688 7688
 	{
7689
-		if (strpos($format, '{'. --$i . '}') !== false)
7690
-			$replacements['{'. $i . '}'] = array_pop($list);
7689
+		if (strpos($format, '{' . --$i . '}') !== false)
7690
+			$replacements['{' . $i . '}'] = array_pop($list);
7691 7691
 		else
7692 7692
 			$done = true;
7693 7693
 	}
@@ -7697,8 +7697,8 @@  discard block
 block discarded – undo
7697 7697
 	$i = 0;
7698 7698
 	while (empty($done))
7699 7699
 	{
7700
-		if (strpos($format, '{'. ++$i . '}') !== false)
7701
-			$replacements['{'. $i . '}'] = array_shift($list);
7700
+		if (strpos($format, '{' . ++$i . '}') !== false)
7701
+			$replacements['{' . $i . '}'] = array_shift($list);
7702 7702
 		else
7703 7703
 			$done = true;
7704 7704
 	}
@@ -7876,7 +7876,7 @@  discard block
 block discarded – undo
7876 7876
 	if (empty($stringSubject))
7877 7877
 		return '';
7878 7878
 
7879
-	$translatable_tokens = preg_match_all('/{(.*?)}/' , $stringSubject, $matches);
7879
+	$translatable_tokens = preg_match_all('/{(.*?)}/', $stringSubject, $matches);
7880 7880
 	$toFind = array();
7881 7881
 	$replaceWith = array();
7882 7882
 
Please login to merge, or discard this patch.
Sources/Load.php 1 patch
Spacing   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
 			'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'],
815 815
 			'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1,
816 816
 			'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0,
817
-			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0,
817
+			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0,
818 818
 			'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0,
819 819
 		),
820 820
 		'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '',
@@ -2471,7 +2471,7 @@  discard block
 block discarded – undo
2471 2471
 	);
2472 2472
 
2473 2473
 	// Add the JQuery library to the list of files to load.
2474
-	$jQueryUrls = array ('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/'. JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-'. JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-'. JQUERY_VERSION . '.min.js');
2474
+	$jQueryUrls = array('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/' . JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-' . JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-' . JQUERY_VERSION . '.min.js');
2475 2475
 	
2476 2476
 	if (isset($modSettings['jquery_source']) && array_key_exists($modSettings['jquery_source'], $jQueryUrls))
2477 2477
 		loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery');
@@ -2712,8 +2712,7 @@  discard block
 block discarded – undo
2712 2712
 		$context['css_files_order'] = array();
2713 2713
 
2714 2714
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2715
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2716
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2715
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2717 2716
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2718 2717
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2719 2718
 	$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true;
@@ -2828,8 +2827,7 @@  discard block
 block discarded – undo
2828 2827
 	global $settings, $context, $modSettings;
2829 2828
 
2830 2829
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2831
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2832
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2830
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2833 2831
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2834 2832
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2835 2833
 	$params['async'] = isset($params['async']) ? $params['async'] : false;
@@ -2934,7 +2932,7 @@  discard block
 block discarded – undo
2934 2932
 					$elements[] = JavaScriptEscape($element);
2935 2933
 			}
2936 2934
 
2937
-			$value = '[' . implode(', ',$elements) . ']';
2935
+			$value = '[' . implode(', ', $elements) . ']';
2938 2936
 		}
2939 2937
 	}
2940 2938
 
@@ -3615,8 +3613,7 @@  discard block
 block discarded – undo
3615 3613
 
3616 3614
 	// What accelerator we are going to try.
3617 3615
 	$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT;
3618
-	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache :
3619
-		CacheApi::APIS_NAMESPACE . $cache_class_name;
3616
+	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name;
3620 3617
 
3621 3618
 	// Do some basic tests.
3622 3619
 	if (class_exists($fully_qualified_class_name))
@@ -3920,7 +3917,7 @@  discard block
 block discarded – undo
3920 3917
 			$auth_secret = hash_file('sha256', $boarddir . '/Settings.php');
3921 3918
 
3922 3919
 			// Set the last error to now, but only every 15 minutes.  Don't need to flood the logs.
3923
-			if (empty($db_last_error) || ($db_last_error + 60*15) <= time())
3920
+			if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time())
3924 3921
 			{
3925 3922
 				updateDbLastError(time());
3926 3923
 				loadLanguage('Errors');
Please login to merge, or discard this patch.
Sources/Register.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@
 block discarded – undo
315 315
 
316 316
 	array_walk_recursive(
317 317
 		$_POST,
318
-		function (&$value, $key) use ($context, $smcFunc)
318
+		function(&$value, $key) use ($context, $smcFunc)
319 319
 		{
320 320
 			// Replace any kind of space with a normal space, and remove any kind of control character, then trim.
321 321
 			$value = $smcFunc['htmltrim'](preg_replace(array('~[\h\v]+~' . ($context['utf8'] ? 'u' : ''), '~\p{Cc}+~'), array(' ', ''), $value));
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.