Completed
Push — release-2.1 ( 093156...093156 )
by Michael
24s queued 18s
created
Sources/ManageMembers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 			// INET.
356 356
 			elseif ($param_info['type'] == 'inet')
357 357
 			{
358
-				if(count($search_params[$param_name]) === 1)
358
+				if (count($search_params[$param_name]) === 1)
359 359
 				{
360 360
 					$query_parts[] = '(' . $param_info['db_fields'][0] . ' = {inet:' . $param_name . '})';
361 361
 					$where_params[$param_name] = $search_params[$param_name][0];
@@ -363,8 +363,8 @@  discard block
 block discarded – undo
363 363
 				elseif (count($search_params[$param_name]) === 2)
364 364
 				{
365 365
 					$query_parts[] = '(' . $param_info['db_fields'][0] . ' <= {inet:' . $param_name . '_high} and ' . $param_info['db_fields'][0] . ' >= {inet:' . $param_name . '_low})';
366
-					$where_params[$param_name.'_low'] = $search_params[$param_name]['low'];
367
-					$where_params[$param_name.'_high'] = $search_params[$param_name]['high'];
366
+					$where_params[$param_name . '_low'] = $search_params[$param_name]['low'];
367
+					$where_params[$param_name . '_high'] = $search_params[$param_name]['high'];
368 368
 				}
369 369
 				
370 370
 			}
@@ -1012,7 +1012,7 @@  discard block
 block discarded – undo
1012 1012
 	if (!empty($context['show_filter']) && !empty($context['available_filters']))
1013 1013
 		$listOptions['additional_rows'][] = array(
1014 1014
 			'position' => 'above_column_headers',
1015
-			'value' => '<strong>' . $txt['admin_browse_filter_show'] . ':</strong> ' . ((isset($context['current_filter']) && isset($txt['admin_browse_filter_type_'.$context['current_filter']])) ? $txt['admin_browse_filter_type_'.$context['current_filter']] : $context['available_filters'][0]['desc']),
1015
+			'value' => '<strong>' . $txt['admin_browse_filter_show'] . ':</strong> ' . ((isset($context['current_filter']) && isset($txt['admin_browse_filter_type_' . $context['current_filter']])) ? $txt['admin_browse_filter_type_' . $context['current_filter']] : $context['available_filters'][0]['desc']),
1016 1016
 			'class' => 'filter_row generic_list_wrapper smalltext',
1017 1017
 		);
1018 1018
 
Please login to merge, or discard this patch.
Sources/Subs-BoardIndex.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	$smcFunc['db_free_result']($result_boards);
136 136
 
137 137
 	// Run through the categories and boards (or only boards)....
138
-	for (reset($row_boards); key($row_boards)!==null; next($row_boards))
138
+	for (reset($row_boards); key($row_boards) !== null; next($row_boards))
139 139
 	{
140 140
 		$row_board = current($row_boards);
141 141
 
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 					$row_boards[$row_board['id_parent']]['id_msg'] = $row_board['id_msg'];
304 304
 					$row_boards[$row_board['id_parent']]['subject'] = $row_board['subject'];
305 305
 					$row_boards[$row_board['id_parent']]['poster_time'] = $row_board['poster_time'];
306
-					$row_boards[$row_board['id_parent']]['short_subject'] = (!empty($row_board['short_subject']) ? $row_board['short_subject'] : '') ;
306
+					$row_boards[$row_board['id_parent']]['short_subject'] = (!empty($row_board['short_subject']) ? $row_board['short_subject'] : '');
307 307
 					$row_boards[$row_board['id_parent']]['poster_name'] = $row_board['poster_name'];
308 308
 					$row_boards[$row_board['id_parent']]['real_name'] = $row_board['real_name'];
309 309
 					$row_boards[$row_board['id_parent']]['id_member'] = $row_board['id_member'];
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 
369 369
 		// Set the last post in the root board 
370 370
 		if (!$isChild && !empty($row_board['poster_time'])
371
-			&& ( empty($this_category[$row_board['id_board']]['last_post']['timestamp'])
371
+			&& (empty($this_category[$row_board['id_board']]['last_post']['timestamp'])
372 372
 				|| $this_category[$row_board['id_board']]['last_post']['timestamp'] < forum_time(true, $row_board['poster_time'])
373 373
 				)
374 374
 			)
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 	if ($boardIndexOptions['include_categories'])
399 399
 		foreach ($categories as &$category)
400 400
 		{
401
-			foreach ($category['boards'] as &$board )
401
+			foreach ($category['boards'] as &$board)
402 402
 			{
403 403
 				if (!empty($moderators[$board['id']]))
404 404
 				{
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 			}
421 421
 		}
422 422
 	else
423
-		foreach ($this_category as &$board )
423
+		foreach ($this_category as &$board)
424 424
 		{
425 425
 			if (!empty($moderators[$board['id']]))
426 426
 			{
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 				$board['last_post']['last_post_message'] = sprintf($txt['last_post_message'], $board['last_post']['member']['link'], $board['last_post']['link'], $board['last_post']['time'] > 0 ? timeformat($board['last_post']['time']) : $txt['not_applicable']);
442 442
 		}
443 443
 
444
-	unset($category,$board);
444
+	unset($category, $board);
445 445
 
446 446
 	if ($boardIndexOptions['include_categories'])
447 447
 		sortCategories($categories);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -419,7 +419,7 @@
 block discarded – undo
419 419
 					$board['last_post']['last_post_message'] = sprintf($txt['last_post_message'], $board['last_post']['member']['link'], $board['last_post']['link'], $board['last_post']['time'] > 0 ? timeformat($board['last_post']['time']) : $txt['not_applicable']);
420 420
 			}
421 421
 		}
422
-	else
422
+		else
423 423
 		foreach ($this_category as &$board )
424 424
 		{
425 425
 			if (!empty($moderators[$board['id']]))
Please login to merge, or discard this patch.
ssi_examples.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,9 @@
 block discarded – undo
89 89
 						<li><a href="#" onclick="showSSIBlock('ssi_quickSearch'); return false;">Quick Search Box</a></li>
90 90
 						<li><a href="#" onclick="showSSIBlock('ssi_recentAttachments'); return false;">Recent Attachments</a></li>
91 91
 					</ul>
92
-					<?php if ($user_info['is_admin']) { ?>
92
+					<?php if ($user_info['is_admin'])
93
+{
94
+?>
93 95
 					<h3>Advanced Functions <img class="help" title="Functions that require additional tweaking, not just copy and paste." src="<?php echo $settings['images_url']; ?>/helptopics.png" alt=""></h3>
94 96
 					<ul>
95 97
 						<li><a href="#" onclick="showSSIBlock('ssi_showPoll'); return false;">Show Single Poll</a></li>
Please login to merge, or discard this patch.
Sources/Subs-Admin.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	{
42 42
 		if (class_exists('Imagick'))
43 43
 		{
44
-			$temp = New Imagick;
44
+			$temp = new Imagick;
45 45
 			$temp2 = $temp->getVersion();
46 46
 			$im_version = $temp2['versionString'];
47 47
 			$extension_version = 'Imagick ' . phpversion('Imagick');
Please login to merge, or discard this patch.
Sources/SplitTopics.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1076,7 +1076,8 @@
 block discarded – undo
1076 1076
 		{
1077 1077
 			unset($topics[$row['id_topic']]); // If we can't see it, we should not merge it and not adjust counts! Instead skip it.
1078 1078
 			continue;
1079
-		}elseif (!$row['approved'])
1079
+		}
1080
+		elseif (!$row['approved'])
1080 1081
 			$boardTotals[$row['id_board']]['unapproved_topics']++;
1081 1082
 		else
1082 1083
 			$boardTotals[$row['id_board']]['topics']++;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1339,7 +1339,7 @@
 block discarded – undo
1339 1339
 	list ($member_started) = $smcFunc['db_fetch_row']($request);
1340 1340
 	list ($member_updated) = $smcFunc['db_fetch_row']($request);
1341 1341
 	// First and last message are the same, so only row was returned.
1342
-	if ($member_updated === NULL)
1342
+	if ($member_updated === null)
1343 1343
 		$member_updated = $member_started;
1344 1344
 
1345 1345
 	$smcFunc['db_free_result']($request);
Please login to merge, or discard this patch.
Sources/ManageSearch.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -223,7 +223,8 @@  discard block
 block discarded – undo
223 223
 		checkSession('get');
224 224
 		validateToken('admin-msm', 'get');
225 225
 
226
-		if ($db_type == 'postgresql') {
226
+		if ($db_type == 'postgresql')
227
+		{
227 228
 			$smcFunc['db_query']('', '
228 229
 				DROP INDEX IF EXISTS {db_prefix}messages_ftx',
229 230
 				array(
@@ -787,7 +788,8 @@  discard block
 block discarded – undo
787 788
 	// We need this for db_get_version
788 789
 	db_extend();
789 790
 
790
-	if ($smcFunc['db_title'] == 'PostgreSQL') {
791
+	if ($smcFunc['db_title'] == 'PostgreSQL')
792
+	{
791 793
 		$request = $smcFunc['db_query']('', '
792 794
 			SELECT
793 795
 				indexname
Please login to merge, or discard this patch.
Sources/Likes.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,6 @@
 block discarded – undo
222 222
 
223 223
 			$this->_validLikes['can_like'] = ($this->_user['id'] == $topicOwner ? 'cannot_like_content' : (allowedTo('likes_like') ? true : 'cannot_like_content'));
224 224
 		}
225
-
226 225
 		else
227 226
 		{
228 227
 			// Modders: This will give you whatever the user offers up in terms of liking, e.g. $this->_type=msg, $this->_content=1
Please login to merge, or discard this patch.
Sources/Subs-MembersOnline.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,6 @@
 block discarded – undo
93 93
 
94 94
 			continue;
95 95
 		}
96
-
97 96
 		elseif (empty($row['show_online']) && empty($membersOnlineOptions['show_hidden']))
98 97
 		{
99 98
 			// Just increase the stats and don't add this hidden user to any list.
Please login to merge, or discard this patch.
Sources/PersonalMessage.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3219,7 +3219,7 @@  discard block
 block discarded – undo
3219 3219
 		// Deleting an existing label?
3220 3220
 		elseif (isset($_POST['delete'], $_POST['delete_label']))
3221 3221
 		{
3222
-			foreach ($_POST['delete_label'] AS $label => $dummy)
3222
+			foreach ($_POST['delete_label'] as $label => $dummy)
3223 3223
 			{
3224 3224
 				unset($the_labels[$label]);
3225 3225
 				$labels_to_remove[] = $label;
@@ -3260,7 +3260,7 @@  discard block
 block discarded – undo
3260 3260
 		if (!empty($labels_to_add))
3261 3261
 		{
3262 3262
 			$inserts = array();
3263
-			foreach ($labels_to_add AS $label)
3263
+			foreach ($labels_to_add as $label)
3264 3264
 				$inserts[] = array($user_info['id'], $label);
3265 3265
 
3266 3266
 			$smcFunc['db_insert']('', '{db_prefix}pm_labels', array('id_member' => 'int', 'name' => 'string-30'), $inserts, array());
@@ -3269,7 +3269,7 @@  discard block
 block discarded – undo
3269 3269
 		// Update existing labels as needed
3270 3270
 		if (!empty($label_upates))
3271 3271
 		{
3272
-			foreach ($label_updates AS $id => $name)
3272
+			foreach ($label_updates as $id => $name)
3273 3273
 			{
3274 3274
 				$smcFunc['db_query']('', '
3275 3275
 					UPDATE {db_prefix}labels
Please login to merge, or discard this patch.