Passed
Pull Request — release-2.1 (#6171)
by Mathias
04:49
created
Sources/ManagePermissions.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1824,7 +1824,7 @@
 block discarded – undo
1824 1824
 	{
1825 1825
 		// Make sure this is an array of integers
1826 1826
 		$excluded_groups = array_filter((array) $excluded_groups, function ($v)
1827
-			{
1827
+		{
1828 1828
 				return is_int($v) || is_string($v) && (string) intval($v) === $v;
1829 1829
 			});
1830 1830
 
Please login to merge, or discard this patch.
Themes/default/GenericControls.template.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,18 +100,22 @@
 block discarded – undo
100 100
 	$tempTab++;
101 101
 	$context['tabindex'] = $tempTab;
102 102
 
103
-	foreach ($context['richedit_buttons'] as $name => $button) {
104
-		if ($name == 'spell_check') {
103
+	foreach ($context['richedit_buttons'] as $name => $button)
104
+	{
105
+		if ($name == 'spell_check')
106
+		{
105 107
 			$button['onclick'] = 'oEditorHandle_' . $editor_id . '.spellCheckStart();';
106 108
 		}
107 109
 
108
-		if ($name == 'preview') {
110
+		if ($name == 'preview')
111
+		{
109 112
 			$button['value'] = isset($editor_context['labels']['preview_button']) ? $editor_context['labels']['preview_button'] : $button['value'];
110 113
 			$button['onclick'] = $editor_context['preview_type'] == 2 ? '' : 'return submitThisOnce(this);';
111 114
 			$button['show'] = $editor_context['preview_type'];
112 115
 		}
113 116
 
114
-		if ($button['show']) {
117
+		if ($button['show'])
118
+		{
115 119
 			echo '
116 120
 		<input type="', $button['type'], '"', $button['type'] == 'hidden' ? ' id="' . $name . '"' : '', ' name="', $name, '" value="', $button['value'], '"', $button['type'] != 'hidden' ? ' tabindex="' . --$tempTab . '"' : '', !empty($button['onclick']) ? ' onclick="' . $button['onclick'] . '"' : '', !empty($button['accessKey']) ? ' accesskey="' . $button['accessKey'] . '"' : '', $button['type'] != 'hidden' ? ' class="button"' : '', '>';
117 121
 		}
Please login to merge, or discard this patch.
Sources/Security.php 1 patch
Braces   -4 removed lines patch added patch discarded remove patch
@@ -1257,7 +1257,6 @@  discard block
 block discarded – undo
1257 1257
 
1258 1258
 			continue;
1259 1259
 		}
1260
-
1261 1260
 		else
1262 1261
 		{
1263 1262
 			$fh = @fopen($path . '/.htaccess', 'w');
@@ -1269,7 +1268,6 @@  discard block
 block discarded – undo
1269 1268
 	Deny from all' . $close);
1270 1269
 				fclose($fh);
1271 1270
 			}
1272
-
1273 1271
 			else
1274 1272
 				$errors[] = 'htaccess_cannot_create_file';
1275 1273
 		}
@@ -1280,7 +1278,6 @@  discard block
 block discarded – undo
1280 1278
 
1281 1279
 			continue;
1282 1280
 		}
1283
-
1284 1281
 		else
1285 1282
 		{
1286 1283
 			$fh = @fopen($path . '/index.php', 'w');
@@ -1307,7 +1304,6 @@  discard block
 block discarded – undo
1307 1304
 ?' . '>');
1308 1305
 				fclose($fh);
1309 1306
 			}
1310
-
1311 1307
 			else
1312 1308
 				$errors[] = 'index-php_cannot_create_file';
1313 1309
 		}
Please login to merge, or discard this patch.
other/install.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -973,7 +973,7 @@
 block discarded – undo
973 973
 		{
974 974
 			$row = $smcFunc['db_fetch_assoc']($result);
975 975
 			if ($row['standard_conforming_strings'] !== 'on')
976
-				{
976
+			{
977 977
 					$incontext['continue'] = 0;
978 978
 					$incontext['error'] = $txt['error_pg_scs'];
979 979
 				}
Please login to merge, or discard this patch.
Sources/News.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2261,7 +2261,8 @@
 block discarded – undo
2261 2261
 			// Sort the attachments by size to make things easier below
2262 2262
 			if (!empty($loaded_attachments))
2263 2263
 			{
2264
-				uasort($loaded_attachments, function($a, $b) {
2264
+				uasort($loaded_attachments, function($a, $b)
2265
+				{
2265 2266
 					if ($a['filesize'] == $b['filesize'])
2266 2267
 					        return 0;
2267 2268
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
Please login to merge, or discard this patch.
Sources/Profile-Modify.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 						log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])]));
501 501
 
502 502
 						$context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set)
503
-							{
503
+						{
504 504
 								return $v != $set;
505 505
 							});
506 506
 					}
@@ -3467,7 +3467,6 @@  discard block
 block discarded – undo
3467 3467
 			}
3468 3468
 		}
3469 3469
 	}
3470
-
3471 3470
 	elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar)
3472 3471
 	{
3473 3472
 		if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar)
Please login to merge, or discard this patch.
Sources/SplitTopics.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -869,7 +869,6 @@
 block discarded – undo
869 869
 		$can_approve_boards = boardsAllowedTo('approve_posts');
870 870
 		$onlyApproved = $can_approve_boards !== array(0) && !in_array($_REQUEST['targetboard'], $can_approve_boards);
871 871
 	}
872
-
873 872
 	else
874 873
 		$onlyApproved = false;
875 874
 
Please login to merge, or discard this patch.
Sources/Subs-Admin.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1197,7 +1197,8 @@  discard block
 block discarded – undo
1197 1197
 	}
1198 1198
 
1199 1199
 	// It's important to do the numbered ones before the named ones, or messes happen.
1200
-	uksort($substitutions, function($a, $b) {
1200
+	uksort($substitutions, function($a, $b)
1201
+	{
1201 1202
 		if (is_int($a) && is_int($b))
1202 1203
 			return $a > $b;
1203 1204
 		elseif (is_int($a))
@@ -1716,8 +1717,12 @@  discard block
 block discarded – undo
1716 1717
 		unset($mtime, $settingsFile, $settingsText);
1717 1718
 		$defined_vars = get_defined_vars();
1718 1719
 	}
1719
-	catch (Throwable $e) {}
1720
-	catch (ErrorException $e) {}
1720
+	catch (Throwable $e)
1721
+	{
1722
+}
1723
+	catch (ErrorException $e)
1724
+	{
1725
+}
1721 1726
 	if (isset($e))
1722 1727
 		return false;
1723 1728
 
@@ -1877,7 +1882,8 @@  discard block
 block discarded – undo
1877 1882
 	// For the same reason, replace literal returns and newlines with "\r" and "\n"
1878 1883
 	elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false))
1879 1884
 	{
1880
-		return strtr(preg_replace_callback('/[\r\n]+/', function($m) {
1885
+		return strtr(preg_replace_callback('/[\r\n]+/', function($m)
1886
+		{
1881 1887
 			return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \'';
1882 1888
 		}, $var), array("'' . " => '', " . ''" => ''));
1883 1889
 	}
Please login to merge, or discard this patch.
cron.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,6 @@
 block discarded – undo
93 93
 	if ($ts <= 0 || $ts % 15 != 0 || time() - $ts < 0 || time() - $ts > 20)
94 94
 		obExit_cron();
95 95
 }
96
-
97 96
 else
98 97
 	$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0';
99 98
 
Please login to merge, or discard this patch.