Passed
Pull Request — release-2.1 (#6842)
by Mathias
04:04
created
Sources/Subs-Post.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -1254,7 +1254,6 @@
 block discarded – undo
1254 1254
 
1255 1255
 		return array($charset, $string, 'base64');
1256 1256
 	}
1257
-
1258 1257
 	else
1259 1258
 		return array($charset, $string, '7bit');
1260 1259
 }
Please login to merge, or discard this patch.
Sources/Subs-Db-mysql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -975,7 +975,7 @@
 block discarded – undo
975 975
 	else
976 976
 	{
977 977
 		$return = array();
978
-		while($row = mysqli_fetch_assoc($request))
978
+		while ($row = mysqli_fetch_assoc($request))
979 979
 			$return[] = $row;
980 980
 	}
981 981
 	return !empty($return) ? $return : array();
Please login to merge, or discard this patch.
Themes/default/ManageMembergroups.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 	<script>
389 389
 		function swapPostGroup(isChecked)
390 390
 		{
391
-			var is_moderator_group = ', (int)$context['is_moderator_group'], ';
391
+			var is_moderator_group = ', (int) $context['is_moderator_group'], ';
392 392
 			var group_type = ', $context['group']['type'], ';
393 393
 			var min_posts_text = document.getElementById(\'min_posts_text\');
394 394
 			var group_desc_text = document.getElementById(\'group_desc_text\');
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 		if (empty($modSettings['deny_boards_access']))
454 454
 			echo '
455 455
 									<li class="category">
456
-										<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \''.$form_id.'\'); return false;"><strong>', $category['name'], '</strong></a>
456
+										<a href="javascript:void(0);" onclick="selectBoards([', implode(', ', $category['child_ids']), '], \'' . $form_id . '\'); return false;"><strong>', $category['name'], '</strong></a>
457 457
 										<ul>';
458 458
 		else
459 459
 			echo '
Please login to merge, or discard this patch.
Sources/SplitTopics.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
 
144 144
 	// Redirect to the selector if they chose selective.
145 145
 	if ($_POST['step2'] == 'selective')
146
-		redirectexit ('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0');
146
+		redirectexit('action=splittopics;sa=selectTopics;subname=' . $_POST['subname'] . ';topic=' . $topic . '.0;start2=0');
147 147
 
148 148
 	$_POST['at'] = (int) $_POST['at'];
149 149
 	$messagesToBeSplit = array();
Please login to merge, or discard this 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.
Themes/default/ReportedContent.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -185,14 +185,14 @@  discard block
 block discarded – undo
185 185
 	$report_buttons = array(
186 186
 		'ignore' => array(
187 187
 			'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore',
188
-			'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;ignore='.(int) !$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'],
188
+			'url' => $scripturl . '?action=moderate;area=reportedposts;sa=handle;ignore=' . (int) !$context['report']['ignore'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'],
189 189
 			'class' => !$context['report']['ignore'] ? ' you_sure' : '',
190 190
 			'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '',
191 191
 			'icon' => 'ignore'
192 192
 		),
193 193
 		'close' => array(
194 194
 			'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close',
195
-			'url' => $scripturl.'?action=moderate;area=reportedposts;sa=handle;closed='.(int) !$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'],
195
+			'url' => $scripturl . '?action=moderate;area=reportedposts;sa=handle;closed=' . (int) !$context['report']['closed'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'],
196 196
 			'icon' => 'close'
197 197
 		)
198 198
 	);
@@ -465,14 +465,14 @@  discard block
 block discarded – undo
465 465
 	$report_buttons = array(
466 466
 		'ignore' => array(
467 467
 			'text' => !$context['report']['ignore'] ? 'mc_reportedp_ignore' : 'mc_reportedp_unignore',
468
-			'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;ignore='.(int)!$context['report']['ignore'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-ignore_token_var'].'='.$context['mod-report-ignore_token'],
468
+			'url' => $scripturl . '?action=moderate;area=reportedmembers;sa=handle;ignore=' . (int) !$context['report']['ignore'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-ignore_token_var'] . '=' . $context['mod-report-ignore_token'],
469 469
 			'class' => !$context['report']['ignore'] ? ' you_sure' : '',
470 470
 			'custom' => !$context['report']['ignore'] ? ' data-confirm="' . $txt['mc_reportedp_ignore_confirm'] . '"' : '',
471 471
 			'icon' => 'ignore'
472 472
 		),
473 473
 		'close' => array(
474 474
 			'text' => $context['report']['closed'] ? 'mc_reportedp_open' : 'mc_reportedp_close',
475
-			'url' => $scripturl.'?action=moderate;area=reportedmembers;sa=handle;closed='.(int)!$context['report']['closed'].';rid='.$context['report']['id'].';'.$context['session_var'].'='.$context['session_id'].';'.$context['mod-report-closed_token_var'].'='.$context['mod-report-closed_token'],
475
+			'url' => $scripturl . '?action=moderate;area=reportedmembers;sa=handle;closed=' . (int) !$context['report']['closed'] . ';rid=' . $context['report']['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';' . $context['mod-report-closed_token_var'] . '=' . $context['mod-report-closed_token'],
476 476
 			'icon' => 'close'
477 477
 		)
478 478
 	);
Please login to merge, or discard this patch.
Sources/Profile.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -619,7 +619,7 @@
 block discarded – undo
619 619
 			if (!empty($modSettings['force_ssl']) && empty($maintenance) && !httpsOn())
620 620
 				fatal_lang_error('login_ssl_required', false);
621 621
 
622
-			$password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] :  '';
622
+			$password = isset($_POST['oldpasswrd']) ? $_POST['oldpasswrd'] : '';
623 623
 
624 624
 			// You didn't even enter a password!
625 625
 			if (trim($password) == '')
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 2 patches
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.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -1456,7 +1456,6 @@
 block discarded – undo
1456 1456
  *
1457 1457
  * @param string $url The url/domain/host we are attempting to vaalidate for the base domain.
1458 1458
  * @param bool $sub_domain (Default: false): When true it will lowest level of a domain off before performing any other logic.
1459
-
1460 1459
  * @since 2.1
1461 1460
  */
1462 1461
 function FindCorsBaseUrl($url, $sub_domain = false)
Please login to merge, or discard this patch.
Sources/Stats.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -816,7 +816,7 @@
 block discarded – undo
816 816
 
817 817
 			$out = 'POST /smf/stats/collect_stats.php HTTP/1.1' . "\r\n";
818 818
 			$out .= 'Host: www.simplemachines.org' . "\r\n";
819
-			$out .= 'user-agent: '. SMF_USER_AGENT . "\r\n";
819
+			$out .= 'user-agent: ' . SMF_USER_AGENT . "\r\n";
820 820
 			$out .= 'content-type: application/x-www-form-urlencoded' . "\r\n";
821 821
 			$out .= 'connection: Close' . "\r\n";
822 822
 			$out .= 'content-length: ' . $length . "\r\n\r\n";
Please login to merge, or discard this patch.