Passed
Push — release-2.1 ( a10d66...005a9e )
by Jon
22:45 queued 18:19
created
Sources/Subs-Charset.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 	$combining_classes = utf8_combining_classes();
250 250
 
251 251
 	// Replace characters with decomposed forms.
252
-	for ($i=0; $i < count($chars); $i++)
252
+	for ($i = 0; $i < count($chars); $i++)
253 253
 	{
254 254
 		// Hangul characters.
255 255
 		if ($chars[$i] >= "\xEA\xB0\x80" && $chars[$i] <= "\xED\x9E\xA3")
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 		{
284 284
 			$temp = $chars[$i];
285 285
 			$chars[$i] = $chars[$i - 1];
286
-			$chars[$i -1] = $temp;
286
+			$chars[$i - 1] = $temp;
287 287
 
288 288
 			// Backtrack and check again.
289 289
 			if ($i > 1)
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 
528 528
 	// Use placeholders to preserve known emoji from further processing.
529 529
 	// Regex source is https://unicode.org/reports/tr51/#EBNF_and_Regex
530
-	$string  = preg_replace_callback(
530
+	$string = preg_replace_callback(
531 531
 		'/' .
532 532
 		// Flag emojis
533 533
 		'[' . $prop_classes['Regional_Indicator'] . ']{2}' .
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 			')?' .
557 557
 		')*' .
558 558
 		'/u',
559
-		function ($matches) use (&$placeholders)
559
+		function($matches) use (&$placeholders)
560 560
 		{
561 561
 			// Skip lone ASCII characters that are not actully part of an emoji sequence.
562 562
 			// This can happen because the digits 0-9 and the '*' and '#' characters are
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 		// Use placeholders for sanctioned variation selectors.
588 588
 		$string = preg_replace_callback(
589 589
 			$patterns,
590
-			function ($matches) use (&$placeholders)
590
+			function($matches) use (&$placeholders)
591 591
 			{
592 592
 				$placeholders[$matches[0]] = "\xEE\xB3\x9B" . md5($matches[0]) . "\xEE\xB3\x9C";
593 593
 				return $placeholders[$matches[0]];
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 			// Do the thing.
668 668
 			$string = preg_replace_callback(
669 669
 				'/' . $pattern . '/u',
670
-				function ($matches) use ($placeholders)
670
+				function($matches) use ($placeholders)
671 671
 				{
672 672
 					return strtr($matches[0], $placeholders);
673 673
 				},
Please login to merge, or discard this patch.
other/update_unicode_data.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 	}
753 753
 }
754 754
 // This sort works decently well to ensure widely used scripts are ranked before rare scripts.
755
-uasort($funcs['utf8_regex_joining_type']['data'], function ($a, $b)
755
+uasort($funcs['utf8_regex_joining_type']['data'], function($a, $b)
756 756
 {
757 757
 	if ($a['stats']['age'] == $b['stats']['age'])
758 758
 	{
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
 	}
829 829
 }
830 830
 // Again, sort commonly used scripts before rare scripts.
831
-uasort($funcs['utf8_regex_indic']['data'], function ($a, $b)
831
+uasort($funcs['utf8_regex_indic']['data'], function($a, $b)
832 832
 {
833 833
 	if ($a['stats']['age'] == $b['stats']['age'])
834 834
 	{
Please login to merge, or discard this patch.
Sources/Subs.php 1 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.
other/install.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 				return false;
93 93
 		},
94 94
 		'utf8_version' => '8.0',
95
-		'utf8_version_check' => function (){
95
+		'utf8_version_check' => function() {
96 96
 			global $db_connection;
97 97
 			$request = pg_query($db_connection, 'SELECT version()');
98 98
 			list ($version) = pg_fetch_row($request);
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
 	$incontext['continue'] = 1;
988 988
 
989 989
 	// Check Postgres setting
990
-	if ( $db_type === 'postgresql')
990
+	if ($db_type === 'postgresql')
991 991
 	{
992 992
 		load_database();
993 993
 		$result = $smcFunc['db_query']('', '
Please login to merge, or discard this patch.
Sources/tasks/CreatePost-Notify.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 			}
188 188
 		}
189 189
 
190
-		$unnotified = array_filter($this->members['watching'], function ($member) {
190
+		$unnotified = array_filter($this->members['watching'], function($member) {
191 191
 			return empty($member['sent']);
192 192
 		});
193 193
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		if ($type == 'edit' || !empty($this->_details['respawns']))
197 197
 		{
198 198
 			// Notifications about modified posts only go to members who were mentioned or quoted
199
-			$this->members['watching'] = $type == 'edit' ? array(): $unnotified;
199
+			$this->members['watching'] = $type == 'edit' ? array() : $unnotified;
200 200
 
201 201
 			// If this post has no quotes or mentions, just delete any obsolete alerts and bail out.
202 202
 			if (empty($this->members['quoted']) && empty($this->members['mentioned']))
@@ -512,8 +512,7 @@  discard block
 block discarded – undo
512 512
 			if (!empty($member_data['id_topic']) && $type != 'topic' && !empty($this->prefs[$member_id]))
513 513
 			{
514 514
 				$pref = !empty($this->prefs[$member_id]['topic_notify_' . $topicOptions['id']]) ?
515
-					$this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] :
516
-					(!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0);
515
+					$this->prefs[$member_id]['topic_notify_' . $topicOptions['id']] : (!empty($this->prefs[$member_id]['topic_notify']) ? $this->prefs[$member_id]['topic_notify'] : 0);
517 516
 
518 517
 				$message_type = 'notification_' . $type;
519 518
 
@@ -532,8 +531,7 @@  discard block
 block discarded – undo
532 531
 			elseif ($type == 'topic')
533 532
 			{
534 533
 				$pref = !empty($this->prefs[$member_id]['board_notify_' . $topicOptions['board']]) ?
535
-					$this->prefs[$member_id]['board_notify_' . $topicOptions['board']] :
536
-					(!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0);
534
+					$this->prefs[$member_id]['board_notify_' . $topicOptions['board']] : (!empty($this->prefs[$member_id]['board_notify']) ? $this->prefs[$member_id]['board_notify'] : 0);
537 535
 
538 536
 				$content_type = 'board';
539 537
 
Please login to merge, or discard this patch.
Sources/ReportedContent.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
 				),
94 94
 				'ignore' => array(
95 95
 					'label' => $report['ignore'] ? $txt['mc_reportedp_unignore'] : $txt['mc_reportedp_ignore'],
96
-					'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;ignore='.(int)!$report['ignore'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'],
96
+					'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;ignore=' . (int) !$report['ignore'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'],
97 97
 					'javascript' => !$report['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '',
98 98
 					'class' => 'you_sure',
99 99
 					'icon' => 'ignore'
100 100
 				),
101 101
 				'close' => array(
102 102
 					'label' => $context['view_closed'] ? $txt['mc_reportedp_open'] : $txt['mc_reportedp_close'],
103
-					'href' => $scripturl.'?action=moderate;area=reported'.$context['report_type'].';sa=handle;closed='.(int)!$report['closed'].';rid='.$report['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'],
103
+					'href' => $scripturl . '?action=moderate;area=reported' . $context['report_type'] . ';sa=handle;closed=' . (int) !$report['closed'] . ';rid=' . $report['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'],
104 104
 					'icon' => $context['view_closed'] ? 'folder' : 'close',
105 105
 				),
106 106
 			);
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 			if ($context['report_type'] == 'posts')
110 110
 				$context['reports'][$key]['quickbuttons']['delete'] = array(
111 111
 					'label' => $txt['mc_reportedp_delete'],
112
-					'href' => $scripturl.'?action=deletemsg;topic='.$report['topic']['id'].'.0;msg='.$report['topic']['id_msg'].';modcenter;'.$context['session_var'].'='.$context['session_id'],
113
-					'javascript' => 'data-confirm="'.$txt['mc_reportedp_delete_confirm'].'"',
112
+					'href' => $scripturl . '?action=deletemsg;topic=' . $report['topic']['id'] . '.0;msg=' . $report['topic']['id_msg'] . ';modcenter;' . $context['session_var'] . '=' . $context['session_id'],
113
+					'javascript' => 'data-confirm="' . $txt['mc_reportedp_delete_confirm'] . '"',
114 114
 					'class' => 'you_sure',
115 115
 					'icon' => 'delete',
116 116
 					'show' => !$report['closed'] && (is_array($context['report_remove_any_boards']) && in_array($report['topic']['id_board'], $context['report_remove_any_boards']))
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 
119 119
 			// Ban reported member/post author link
120 120
 			if ($context['report_type'] == 'members')
121
-				$ban_link = $scripturl.'?action=admin;area=ban;sa=add;u='.$report['user']['id'].';'.$context['session_var'].'='.$context['session_id'];
121
+				$ban_link = $scripturl . '?action=admin;area=ban;sa=add;u=' . $report['user']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'];
122 122
 			else
123
-				$ban_link = $scripturl.'?action=admin;area=ban;sa=add'.(!empty($report['author']['id']) ? ';u='.$report['author']['id'] : ';msg='.$report['topic']['id_msg']).';'.$context['session_var'].'='.$context['session_id'];
123
+				$ban_link = $scripturl . '?action=admin;area=ban;sa=add' . (!empty($report['author']['id']) ? ';u=' . $report['author']['id'] : ';msg=' . $report['topic']['id_msg']) . ';' . $context['session_var'] . '=' . $context['session_id'];
124 124
 
125 125
 			$context['reports'][$key]['quickbuttons'] += array(
126 126
 				'ban' => array(
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 				),
132 132
 				'quickmod' => array(
133 133
 					'class' => 'inline_mod_check',
134
-					'content' => '<input type="checkbox" name="close[]" value="'.$report['id'].'">',
134
+					'content' => '<input type="checkbox" name="close[]" value="' . $report['id'] . '">',
135 135
 					'show' => !$context['view_closed'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1
136 136
 				)
137 137
 			);
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
 
@@ -1959,7 +1959,7 @@  discard block
 block discarded – undo
1959 1959
 				<div class="smalltext">
1960 1960
 					<div class="recipient_to"><strong>', $txt['to'], ':</strong> ', implode(', ', $draft['recipients']['to']), '</div>';
1961 1961
 
1962
-			if(!empty($draft['recipients']['bcc']))
1962
+			if (!empty($draft['recipients']['bcc']))
1963 1963
 				echo'
1964 1964
 					<div class="pm_bbc"><strong>', $txt['pm_bcc'], ':</strong> ', implode(', ', $draft['recipients']['bcc']), '</div>';
1965 1965
 
Please login to merge, or discard this patch.
Themes/default/Admin.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -758,7 +758,7 @@  discard block
 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
 
@@ -1659,7 +1659,7 @@  discard block
 block discarded – undo
1659 1659
 		echo '
1660 1660
 								<form action="' . $scripturl . '?action=admin;area=search" method="post" accept-charset="' . $context['character_set'] . '" class="admin_search">
1661 1661
 									<span class="main_icons filter centericon"></span>
1662
-									<input type="search" name="search_term" placeholder="', $txt['admin_search'], '"', isset($context['search_term']) ? ' value="' . $context['search_term'] . '"' : '','>
1662
+									<input type="search" name="search_term" placeholder="', $txt['admin_search'], '"', isset($context['search_term']) ? ' value="' . $context['search_term'] . '"' : '', '>
1663 1663
 									<select name="search_type">
1664 1664
 										<option value="internal"', (empty($context['admin_preferences']['sb']) || $context['admin_preferences']['sb'] == 'internal' ? ' selected' : ''), '>', $txt['admin_search_type_internal'], '</option>
1665 1665
 										<option value="member"', (!empty($context['admin_preferences']['sb']) && $context['admin_preferences']['sb'] == 'member' ? ' selected' : ''), '>', $txt['admin_search_type_member'], '</option>
Please login to merge, or discard this patch.
Sources/Load.php 1 patch
Spacing   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
 			'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'],
854 854
 			'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1,
855 855
 			'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0,
856
-			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0,
856
+			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0,
857 857
 			'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0,
858 858
 		),
859 859
 		'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '',
@@ -2539,7 +2539,7 @@  discard block
 block discarded – undo
2539 2539
 	);
2540 2540
 
2541 2541
 	// Add the JQuery library to the list of files to load.
2542
-	$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');
2542
+	$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');
2543 2543
 
2544 2544
 	if (isset($modSettings['jquery_source']) && array_key_exists($modSettings['jquery_source'], $jQueryUrls))
2545 2545
 		loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery');
@@ -2780,8 +2780,7 @@  discard block
 block discarded – undo
2780 2780
 		$context['css_files_order'] = array();
2781 2781
 
2782 2782
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2783
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2784
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2783
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2785 2784
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2786 2785
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2787 2786
 	$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true;
@@ -2896,8 +2895,7 @@  discard block
 block discarded – undo
2896 2895
 	global $settings, $context, $modSettings;
2897 2896
 
2898 2897
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2899
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2900
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2898
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2901 2899
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2902 2900
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2903 2901
 	$params['async'] = isset($params['async']) ? $params['async'] : false;
@@ -3687,8 +3685,7 @@  discard block
 block discarded – undo
3687 3685
 
3688 3686
 	// What accelerator we are going to try.
3689 3687
 	$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT;
3690
-	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache :
3691
-		CacheApi::APIS_NAMESPACE . $cache_class_name;
3688
+	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name;
3692 3689
 
3693 3690
 	// Do some basic tests.
3694 3691
 	if (class_exists($fully_qualified_class_name))
@@ -3992,7 +3989,7 @@  discard block
 block discarded – undo
3992 3989
 			$auth_secret = hash_file('sha256', $boarddir . '/Settings.php');
3993 3990
 
3994 3991
 			// Set the last error to now, but only every 15 minutes.  Don't need to flood the logs.
3995
-			if (empty($db_last_error) || ($db_last_error + 60*15) <= time())
3992
+			if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time())
3996 3993
 			{
3997 3994
 				updateDbLastError(time());
3998 3995
 				loadLanguage('Errors');
Please login to merge, or discard this patch.