Passed
Pull Request — release-2.1 (#6842)
by Mathias
04:40 queued 10s
created
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.
Sources/Subs-Sound.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@
 block discarded – undo
67 67
 		$sound_letter = substr($sound_letter, strpos($sound_letter, 'data') + 8);
68 68
 		switch ($word[$i] === 's' ? 0 : mt_rand(0, 2))
69 69
 		{
70
-			case 0 :
71
-				for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++)
70
+			case 0 : for ($j = 0, $n = strlen($sound_letter); $j < $n; $j++)
72 71
 					for ($k = 0, $m = round(mt_rand(15, 25) / 10); $k < $m; $k++)
73 72
 						$sound_word .= $word[$i] === 's' ? $sound_letter[$j] : chr(mt_rand(max(ord($sound_letter[$j]) - 1, 0x00), min(ord($sound_letter[$j]) + 1, 0xFF)));
74 73
 				break;
Please login to merge, or discard this patch.
other/install.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -959,7 +959,7 @@
 block discarded – undo
959 959
 	$incontext['continue'] = 1;
960 960
 
961 961
 	// Check Postgres setting
962
-	if ( $db_type === 'postgresql')
962
+	if ($db_type === 'postgresql')
963 963
 	{
964 964
 		load_database();
965 965
 		$result = $smcFunc['db_query']('', '
Please login to merge, or discard this 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/ScheduledTasks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	clean_cache();
170 170
 
171 171
 	// If warning decrement is enabled and we have people who have not had a new warning in 24 hours, lower their warning level.
172
-	list (, , $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']);
172
+	list (,, $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']);
173 173
 	if ($modSettings['warning_decrement'])
174 174
 	{
175 175
 		// Find every member who has a warning level...
@@ -1622,7 +1622,7 @@  discard block
 block discarded – undo
1622 1622
 	// Determine action based on last_login...
1623 1623
 	$purgeMembers = array();
1624 1624
 	$markReadMembers = array();
1625
-	foreach($members as $member)
1625
+	foreach ($members as $member)
1626 1626
 	{
1627 1627
 		if ($member['last_login'] <= $cleanupBeyond)
1628 1628
 			$purgeMembers[] = $member['id_member'];
Please login to merge, or discard this patch.
Sources/News.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2263,7 +2263,7 @@
 block discarded – undo
2263 2263
 			{
2264 2264
 				uasort($loaded_attachments, function($a, $b) {
2265 2265
 					if ($a['filesize'] == $b['filesize'])
2266
-					        return 0;
2266
+							return 0;
2267 2267
 					return ($a['filesize'] < $b['filesize']) ? -1 : 1;
2268 2268
 				});
2269 2269
 			}
Please login to merge, or discard this 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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	);
93 93
 	foreach (array('action', 'sa', 'type', 'board', 'boards', 'c', 'u', 'limit', 'offset') as $var)
94 94
 		if (isset($_GET[$var]))
95
-			$feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';' ) . $var . '=' . $_GET[$var];
95
+			$feed_meta['self'] .= ($feed_meta['self'] === $scripturl ? '?' : ';') . $var . '=' . $_GET[$var];
96 96
 
97 97
 	// Handle the cases where a board, boards, or category is asked for.
98 98
 	$query_this_board = 1;
@@ -299,17 +299,17 @@  discard block
 block discarded – undo
299 299
 	 * namespaces, which could cause it to mangle the XML horrifically
300 300
 	 * during processing.
301 301
 	 */
302
-	$smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/' . $subaction;
302
+	$smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/' . $subaction;
303 303
 
304 304
 	// Allow mods to add extra namespaces and tags to the feed/channel
305 305
 	$namespaces = array(
306 306
 		'rss' => array(),
307
-		'rss2' => array('atom' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'),
308
-		'atom' => array('' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/2005/Atom'),
307
+		'rss2' => array('atom' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'),
308
+		'atom' => array('' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/2005/Atom'),
309 309
 		'rdf' => array(
310
-			'' => 'htt'.'p:/'.'/purl.o'.'rg/rss/1.0/',
311
-			'rdf' => 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/02/22-rdf-syntax-ns#',
312
-			'dc' => 'htt'.'p:/'.'/purl.o'.'rg/dc/elements/1.1/',
310
+			'' => 'htt' . 'p:/' . '/purl.o' . 'rg/rss/1.0/',
311
+			'rdf' => 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/02/22-rdf-syntax-ns#',
312
+			'dc' => 'htt' . 'p:/' . '/purl.o' . 'rg/dc/elements/1.1/',
313 313
 		),
314 314
 		'smf' => array(
315 315
 			'smf' => $smf_ns,
Please login to merge, or discard this patch.
Sources/Profile-View.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -695,7 +695,7 @@
 block discarded – undo
695 695
 				'icon' => 'move',
696 696
 			),
697 697
 			'quickmod' => array(
698
-    			'class' => 'inline_mod_check',
698
+				'class' => 'inline_mod_check',
699 699
 				'content' => '<input type="checkbox" name="mark[' . $id . ']" value="' . $id . '">',
700 700
 				'show' => $context['showCheckboxes']
701 701
 			)
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 			AND a.is_read = 0' : '') . (!empty($alertIDs) ? '
262 262
 			AND a.id_alert IN ({array_int:alertIDs})' : '') . '
263 263
 		ORDER BY id_alert DESC' . (!empty($limit) ? '
264
-		LIMIT {int:limit}' : '') . (!empty($offset) ?'
264
+		LIMIT {int:limit}' : '') . (!empty($offset) ? '
265 265
 		OFFSET {int:offset}' : ''),
266 266
 		array(
267 267
 			'id_member' => $memID,
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 	call_integration_hook('integrate_fetch_alerts', array(&$alerts, &$formats));
360 360
 
361 361
 	// Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.)
362
-	$formats = array_map(function ($format) use ($scripturl) {
362
+	$formats = array_map(function($format) use ($scripturl) {
363 363
 		$format['link'] = str_replace('{scripturl}', $scripturl, $format['link']);
364 364
 		$format['text'] = str_replace('{scripturl}', $scripturl, $format['text']);
365 365
 
@@ -1166,20 +1166,20 @@  discard block
 block discarded – undo
1166 1166
 		$context['posts'][$key]['quickbuttons'] = array(
1167 1167
 			'reply' => array(
1168 1168
 				'label' => $txt['reply'],
1169
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'],
1169
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'],
1170 1170
 				'icon' => 'reply_button',
1171 1171
 				'show' => $post['can_reply']
1172 1172
 			),
1173 1173
 			'quote' => array(
1174 1174
 				'label' => $txt['quote_action'],
1175
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'],
1175
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'],
1176 1176
 				'icon' => 'quote',
1177 1177
 				'show' => $post['can_quote']
1178 1178
 			),
1179 1179
 			'remove' => array(
1180 1180
 				'label' => $txt['remove'],
1181
-				'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
1182
-				'javascript' => 'data-confirm="'.$txt['remove_message'].'"',
1181
+				'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
1182
+				'javascript' => 'data-confirm="' . $txt['remove_message'] . '"',
1183 1183
 				'class' => 'you_sure',
1184 1184
 				'icon' => 'remove_button',
1185 1185
 				'show' => $post['can_delete']
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -359,7 +359,8 @@
 block discarded – undo
359 359
 	call_integration_hook('integrate_fetch_alerts', array(&$alerts, &$formats));
360 360
 
361 361
 	// Substitute $scripturl into the link formats. (Done here to make life easier for hooked mods.)
362
-	$formats = array_map(function ($format) use ($scripturl) {
362
+	$formats = array_map(function ($format) use ($scripturl)
363
+	{
363 364
 		$format['link'] = str_replace('{scripturl}', $scripturl, $format['link']);
364 365
 		$format['text'] = str_replace('{scripturl}', $scripturl, $format['text']);
365 366
 
Please login to merge, or discard this patch.
Themes/default/index.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -574,7 +574,7 @@
 block discarded – undo
574 574
 				$value['id'] = $key;
575 575
 
576 576
 			$button = '
577
-				<a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>'.(!empty($value['icon']) ? '<span class="main_icons '.$value['icon'].'"></span>' : '').'' . $txt[$value['text']] . '</a>';
577
+				<a class="button button_strip_' . $key . (!empty($value['active']) ? ' active' : '') . (isset($value['class']) ? ' ' . $value['class'] : '') . '" ' . (!empty($value['url']) ? 'href="' . $value['url'] . '"' : '') . ' ' . (isset($value['custom']) ? ' ' . $value['custom'] : '') . '>' . (!empty($value['icon']) ? '<span class="main_icons ' . $value['icon'] . '"></span>' : '') . '' . $txt[$value['text']] . '</a>';
578 578
 
579 579
 			if (!empty($value['sub_buttons']))
580 580
 			{
Please login to merge, or discard this patch.
Themes/default/PersonalMessage.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1931,7 +1931,7 @@
 block discarded – undo
1931 1931
 				<div class="floatright smalltext righttext">
1932 1932
 					<div class="recipient_to">&#171;&nbsp;<strong>', $txt['to'], ':</strong> ', implode(', ', $draft['recipients']['to']), '&nbsp;&#187;</div>';
1933 1933
 
1934
-			if(!empty($draft['recipients']['bcc']))
1934
+			if (!empty($draft['recipients']['bcc']))
1935 1935
 				echo'
1936 1936
 					<div class="pm_bbc">&#171;&nbsp;<strong>', $txt['pm_bcc'], ':</strong> ', implode(', ', $draft['recipients']['bcc']), '&nbsp;&#187;</div>';
1937 1937
 
Please login to merge, or discard this patch.