Completed
Push — release-2.1 ( 421483...dcbbf5 )
by Jon
07:27 queued 03:43
created
Sources/Subs.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
@@ -1631,7 +1631,7 @@  discard block
 block discarded – undo
1631 1631
 				'type' => 'unparsed_commas_content',
1632 1632
 				'test' => '\d+,\d+\]',
1633 1633
 				'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>',
1634
-				'validate' => function (&$tag, &$data, $disabled)
1634
+				'validate' => function(&$tag, &$data, $disabled)
1635 1635
 				{
1636 1636
 					$scheme = parse_url($data[0], PHP_URL_SCHEME);
1637 1637
 					if (empty($scheme))
@@ -2169,12 +2169,12 @@  discard block
 block discarded – undo
2169 2169
 		$codes[] = array(
2170 2170
 			'tag' => 'cowsay',
2171 2171
 			'parameters' => array(
2172
-				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2172
+				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc)
2173 2173
 					{
2174 2174
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2175 2175
 					},
2176 2176
 				),
2177
-				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2177
+				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function($tongue) use ($smcFunc)
2178 2178
 					{
2179 2179
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2180 2180
 					},
@@ -3546,7 +3546,7 @@  discard block
 block discarded – undo
3546 3546
 		if ($fp != false)
3547 3547
 		{
3548 3548
 			// Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.)
3549
-			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");
3549
+			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");
3550 3550
 
3551 3551
 			// Read in the HTTP/1.1 or whatever.
3552 3552
 			$test = substr(fgets($fp, 11), -1);
@@ -4150,7 +4150,7 @@  discard block
 block discarded – undo
4150 4150
 	$toMinify = array();
4151 4151
 	$normal = array();
4152 4152
 
4153
-	usort($context['css_files'], function ($a, $b)
4153
+	usort($context['css_files'], function($a, $b)
4154 4154
 	{
4155 4155
 		return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
4156 4156
 	});
@@ -5446,7 +5446,7 @@  discard block
 block discarded – undo
5446 5446
 			{
5447 5447
 				fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n");
5448 5448
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
5449
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
5449
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
5450 5450
 				if ($keep_alive)
5451 5451
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n");
5452 5452
 				else
@@ -5456,7 +5456,7 @@  discard block
 block discarded – undo
5456 5456
 			{
5457 5457
 				fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n");
5458 5458
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
5459
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
5459
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
5460 5460
 				if ($keep_alive)
5461 5461
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n");
5462 5462
 				else
@@ -5704,13 +5704,13 @@  discard block
 block discarded – undo
5704 5704
 
5705 5705
 	// UTF-8 occurences of MS special characters
5706 5706
 	$findchars_utf8 = array(
5707
-		"\xe2\x80\x9a",	// single low-9 quotation mark
5708
-		"\xe2\x80\x9e",	// double low-9 quotation mark
5709
-		"\xe2\x80\xa6",	// horizontal ellipsis
5710
-		"\xe2\x80\x98",	// left single curly quote
5711
-		"\xe2\x80\x99",	// right single curly quote
5712
-		"\xe2\x80\x9c",	// left double curly quote
5713
-		"\xe2\x80\x9d",	// right double curly quote
5707
+		"\xe2\x80\x9a", // single low-9 quotation mark
5708
+		"\xe2\x80\x9e", // double low-9 quotation mark
5709
+		"\xe2\x80\xa6", // horizontal ellipsis
5710
+		"\xe2\x80\x98", // left single curly quote
5711
+		"\xe2\x80\x99", // right single curly quote
5712
+		"\xe2\x80\x9c", // left double curly quote
5713
+		"\xe2\x80\x9d", // right double curly quote
5714 5714
 	);
5715 5715
 
5716 5716
 	// windows 1252 / iso equivalents
@@ -5726,13 +5726,13 @@  discard block
 block discarded – undo
5726 5726
 
5727 5727
 	// safe replacements
5728 5728
 	$replacechars = array(
5729
-		',',	// &sbquo;
5730
-		',,',	// &bdquo;
5731
-		'...',	// &hellip;
5732
-		"'",	// &lsquo;
5733
-		"'",	// &rsquo;
5734
-		'"',	// &ldquo;
5735
-		'"',	// &rdquo;
5729
+		',', // &sbquo;
5730
+		',,', // &bdquo;
5731
+		'...', // &hellip;
5732
+		"'", // &lsquo;
5733
+		"'", // &rsquo;
5734
+		'"', // &ldquo;
5735
+		'"', // &rdquo;
5736 5736
 	);
5737 5737
 
5738 5738
 	if ($context['utf8'])
@@ -6917,7 +6917,7 @@  discard block
 block discarded – undo
6917 6917
 			EXISTS (
6918 6918
 				SELECT bpv.id_board
6919 6919
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
6920
-				WHERE bpv.id_group IN ('. implode(',', $groups) .')
6920
+				WHERE bpv.id_group IN ('. implode(',', $groups) . ')
6921 6921
 					AND bpv.deny = 0
6922 6922
 					AND bpv.id_board = b.id_board
6923 6923
 			)';
@@ -6927,7 +6927,7 @@  discard block
 block discarded – undo
6927 6927
 			AND NOT EXISTS (
6928 6928
 				SELECT bpv.id_board
6929 6929
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
6930
-				WHERE bpv.id_group IN ( '. implode(',', $groups) .')
6930
+				WHERE bpv.id_group IN ( '. implode(',', $groups) . ')
6931 6931
 					AND bpv.deny = 1
6932 6932
 					AND bpv.id_board = b.id_board
6933 6933
 			)';
@@ -7198,8 +7198,8 @@  discard block
 block discarded – undo
7198 7198
 	$i = 0;
7199 7199
 	while (empty($done))
7200 7200
 	{
7201
-		if (strpos($format, '{'. --$i . '}') !== false)
7202
-			$replacements['{'. $i . '}'] = array_pop($list);
7201
+		if (strpos($format, '{' . --$i . '}') !== false)
7202
+			$replacements['{' . $i . '}'] = array_pop($list);
7203 7203
 		else
7204 7204
 			$done = true;
7205 7205
 	}
@@ -7209,8 +7209,8 @@  discard block
 block discarded – undo
7209 7209
 	$i = 0;
7210 7210
 	while (empty($done))
7211 7211
 	{
7212
-		if (strpos($format, '{'. ++$i . '}') !== false)
7213
-			$replacements['{'. $i . '}'] = array_shift($list);
7212
+		if (strpos($format, '{' . ++$i . '}') !== false)
7213
+			$replacements['{' . $i . '}'] = array_shift($list);
7214 7214
 		else
7215 7215
 			$done = true;
7216 7216
 	}
Please login to merge, or discard this patch.