Passed
Pull Request — release-2.1 (#6901)
by John
04:55
created
Sources/Cache/APIs/FileBased.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		$class_name = $this->getImplementationClassKeyName();
185 185
 		$class_name_txt_key = strtolower($class_name);
186 186
 
187
-		$config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings'];
187
+		$config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings'];
188 188
 		$config_vars[] = array('cachedir', $txt['cachedir'], 'file', 'text', 36, 'cache_cachedir');
189 189
 
190 190
 		if (!isset($context['settings_post_javascript']))
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		$context['settings_post_javascript'] .= '
194 194
 			$("#cache_accelerator").change(function (e) {
195 195
 				var cache_type = e.currentTarget.value;
196
-				$("#cachedir").prop("disabled", cache_type != "'. $class_name .'");
196
+				$("#cachedir").prop("disabled", cache_type != "'. $class_name . '");
197 197
 			});';
198 198
 	}
199 199
 
Please login to merge, or discard this patch.
Sources/Cache/APIs/Sqlite.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
 		$class_name = $this->getImplementationClassKeyName();
132 132
 		$class_name_txt_key = strtolower($class_name);
133 133
 
134
-		$config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings'];
134
+		$config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings'];
135 135
 		$config_vars[] = array(
136
-			'cachedir_'. $class_name_txt_key,
137
-			$txt['cachedir_'. $class_name_txt_key],
136
+			'cachedir_' . $class_name_txt_key,
137
+			$txt['cachedir_' . $class_name_txt_key],
138 138
 			'file',
139 139
 			'text',
140 140
 			36,
141
-			'cache_'. $class_name_txt_key .'_cachedir');
141
+			'cache_' . $class_name_txt_key . '_cachedir');
142 142
 
143 143
 		if (!isset($context['settings_post_javascript']))
144 144
 			$context['settings_post_javascript'] = '';
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 		$context['settings_post_javascript'] .= '
147 147
 			$("#cache_accelerator").change(function (e) {
148 148
 				var cache_type = e.currentTarget.value;
149
-				$("#cachedir_'. $class_name_txt_key .'").prop("disabled", cache_type != "'. $class_name .'");
149
+				$("#cachedir_'. $class_name_txt_key . '").prop("disabled", cache_type != "' . $class_name . '");
150 150
 			});';
151 151
 	}
152 152
 
Please login to merge, or discard this patch.
Sources/ManageServer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1638,7 +1638,7 @@
 block discarded – undo
1638 1638
 	$cacheAPIdir = $sourcedir . '/Cache';
1639 1639
 
1640 1640
 	$loadedApis = array();
1641
-	$apis_dir = $cacheAPIdir .'/'. CacheApi::APIS_FOLDER;
1641
+	$apis_dir = $cacheAPIdir . '/' . CacheApi::APIS_FOLDER;
1642 1642
 
1643 1643
 	$api_classes = new GlobIterator($apis_dir . '/*.php', FilesystemIterator::NEW_CURRENT_AND_KEY);
1644 1644
 
Please login to merge, or discard this patch.
Sources/Subs-BoardIndex.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -195,8 +195,7 @@
 block discarded – undo
195 195
 				);
196 196
 
197 197
 				$categories[$row_board['id_cat']]['link'] = '<a id="c' . $row_board['id_cat'] . '"></a>' . (!$context['user']['is_guest'] ?
198
-						'<a href="' . $scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], $row_board['cat_name']) . '">' . $row_board['cat_name'] . '</a>' :
199
-						$row_board['cat_name']);
198
+						'<a href="' . $scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], $row_board['cat_name']) . '">' . $row_board['cat_name'] . '</a>' : $row_board['cat_name']);
200 199
 
201 200
 			}
202 201
 
Please login to merge, or discard this patch.
Sources/Subs-Boards.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 
852 852
 	clean_cache('data');
853 853
 
854
-	cache_put_data('parsed_boards_descriptions_'. $parsed_boards_cat_id, $already_parsed_boards, 864000);
854
+	cache_put_data('parsed_boards_descriptions_' . $parsed_boards_cat_id, $already_parsed_boards, 864000);
855 855
 
856 856
 	if (empty($boardOptions['dont_log']))
857 857
 		logAction('edit_board', array('board' => $board_id), 'admin');
@@ -1579,7 +1579,7 @@  discard block
 block discarded – undo
1579 1579
 			$context['description_allowed_tags']
1580 1580
 		);
1581 1581
 
1582
-	cache_put_data('parsed_boards_descriptions_'. $category_id, $already_parsed_boards, 864000);
1582
+	cache_put_data('parsed_boards_descriptions_' . $category_id, $already_parsed_boards, 864000);
1583 1583
 
1584 1584
 	return $already_parsed_boards;
1585 1585
 }
Please login to merge, or discard this patch.
Themes/default/Packages.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -455,7 +455,7 @@
 block discarded – undo
455 455
 
456 456
 	elseif ($context['uninstalling'])
457 457
 		echo '
458
-			', $txt['package_uninstall_done'] .' <br>
458
+			', $txt['package_uninstall_done'] . ' <br>
459 459
 			', '<a href="', $context['keep_url'], '" class="button">', $txt['package_keep'], '</a>', '<a href="', $context['remove_url'], '" class="button">', $txt['package_delete2'], '</a>';
460 460
 
461 461
 	elseif ($context['install_finished'])
Please login to merge, or discard this patch.
Sources/ManageSettings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -364,8 +364,8 @@  discard block
 block discarded – undo
364 364
 		}
365 365
 
366 366
 		// Clean up tags with children
367
-		foreach($bbcTagsChildren as $parent_tag => $children)
368
-			foreach($children as $index => $child_tag)
367
+		foreach ($bbcTagsChildren as $parent_tag => $children)
368
+			foreach ($children as $index => $child_tag)
369 369
 			{
370 370
 				// Remove entries where parent and child tag is the same
371 371
 				if ($child_tag == $parent_tag)
@@ -1888,25 +1888,25 @@  discard block
 block discarded – undo
1888 1888
 		$fields = array();
1889 1889
 		$new_sort = array();
1890 1890
 
1891
-		while($row = $smcFunc['db_fetch_assoc']($request))
1891
+		while ($row = $smcFunc['db_fetch_assoc']($request))
1892 1892
 				$fields[] = $row['id_field'];
1893 1893
 		$smcFunc['db_free_result']($request);
1894 1894
 
1895 1895
 		$idx = array_search($context['fid'], $fields);
1896 1896
 
1897
-		if ($_GET['move'] == 'down' && count($fields) - 1 > $idx )
1897
+		if ($_GET['move'] == 'down' && count($fields) - 1 > $idx)
1898 1898
 		{
1899
-				$new_sort = array_slice($fields ,0 ,$idx ,true);
1899
+				$new_sort = array_slice($fields, 0, $idx, true);
1900 1900
 				$new_sort[] = $fields[$idx + 1];
1901 1901
 				$new_sort[] = $fields[$idx];
1902
-				$new_sort += array_slice($fields ,$idx + 2 ,count($fields) ,true);
1902
+				$new_sort += array_slice($fields, $idx + 2, count($fields), true);
1903 1903
 		}
1904 1904
 		elseif ($context['fid'] > 0 and $idx < count($fields))
1905 1905
 		{
1906
-				$new_sort = array_slice($fields ,0 ,($idx - 1) ,true);
1906
+				$new_sort = array_slice($fields, 0, ($idx - 1), true);
1907 1907
 				$new_sort[] = $fields[$idx];
1908 1908
 				$new_sort[] = $fields[$idx - 1];
1909
-				$new_sort += array_slice($fields ,($idx + 1) ,count($fields) ,true);
1909
+				$new_sort += array_slice($fields, ($idx + 1), count($fields), true);
1910 1910
 		}
1911 1911
 		else
1912 1912
 			redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler
Please login to merge, or discard this patch.
Themes/default/ModerationCenter.template.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -393,18 +393,18 @@  discard block
 block discarded – undo
393 393
 		$quickbuttons = array(
394 394
 			'approve' => array(
395 395
 				'label' => $txt['approve'],
396
-				'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';approve='.$item['id'],
396
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';approve=' . $item['id'],
397 397
 				'icon' => 'approve',
398 398
 			),
399 399
 			'delete' => array(
400 400
 				'label' => $txt['remove'],
401
-				'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';delete='.$item['id'],
401
+				'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';delete=' . $item['id'],
402 402
 				'icon' => 'remove_button',
403 403
 				'show' => $item['can_delete']
404 404
 			),
405 405
 			'quickmod' => array(
406 406
 				'class' => 'inline_mod_check',
407
-				'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>',
407
+				'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>',
408 408
 				'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1
409 409
 			),
410 410
 		);
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 	$quickbuttons = array(
470 470
 		'delete' => array(
471 471
 			'label' => $txt['remove_message'],
472
-			'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'],
472
+			'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'],
473 473
 			'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '"',
474 474
 			'class' => 'you_sure',
475 475
 			'icon' => 'remove_button',
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']
136 136
 				)
137 137
 			);
Please login to merge, or discard this patch.