Passed
Pull Request — release-2.1 (#6274)
by Mathias
05:20
created
Sources/ManageErrors.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -355,8 +355,8 @@
 block discarded – undo
355 355
 	elseif (isset($_POST['delall']) && isset($filter))
356 356
 	{
357 357
 		// ip need a different placeholder type
358
-		$filter_type = $filter['variable'] == 'ip'? 'inet' : 'string';
359
-		$filter_op = $filter['variable'] == 'ip'? '=' : 'LIKE';
358
+		$filter_type = $filter['variable'] == 'ip' ? 'inet' : 'string';
359
+		$filter_op = $filter['variable'] == 'ip' ? '=' : 'LIKE';
360 360
 		$smcFunc['db_query']('', '
361 361
 			DELETE FROM {db_prefix}log_errors
362 362
 			WHERE ' . $filter['variable'] . ' ' . $filter_op . ' {' . $filter_type . ':filter}',
Please login to merge, or discard this patch.
Sources/News.php 1 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-Export.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
 
460 460
 	// Figure out the filename we'll tell the browser.
461 461
 	$datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile');
462
-	$included_desc = array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes);
462
+	$included_desc = array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes);
463 463
 
464 464
 	$dlfilename = array_merge(array($context['forum_name'], $context['member']['username']), $included_desc);
465 465
 	$dlfilename = preg_replace('/[^\p{L}\p{M}\p{N}_]+/u', '-', str_replace('"', '', un_htmlspecialchars(strip_tags(implode('_', $dlfilename)))));
@@ -774,9 +774,9 @@  discard block
 block discarded – undo
774 774
 	$xslt_variables = array();
775 775
 
776 776
 	// Do not change any of these to HTTPS URLs. For explanation, see comments in the buildXmlFeed() function.
777
-	$smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/profile';
778
-	$xslt_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/XSL/Transform';
779
-	$html_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/xhtml';
777
+	$smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/profile';
778
+	$xslt_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/XSL/Transform';
779
+	$html_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/xhtml';
780 780
 
781 781
 	require_once($sourcedir . DIRECTORY_SEPARATOR . 'News.php');
782 782
 
@@ -1682,14 +1682,14 @@  discard block
 block discarded – undo
1682 1682
 
1683 1683
 		if (!empty($context['export_css_header']))
1684 1684
 		{
1685
-			$stylesheet['css_js'] .=  '
1685
+			$stylesheet['css_js'] .= '
1686 1686
 			<style><![CDATA[' . "\n" . implode("\n", $context['export_css_header']) . "\n" . ']]>
1687 1687
 			</style>';
1688 1688
 		}
1689 1689
 
1690 1690
 		if (!empty($context['export_javascript_vars']))
1691 1691
 		{
1692
-			$stylesheet['css_js'] .=  '
1692
+			$stylesheet['css_js'] .= '
1693 1693
 			<script><![CDATA[';
1694 1694
 
1695 1695
 			foreach ($context['export_javascript_vars'] as $var => $val)
@@ -1725,7 +1725,7 @@  discard block
 block discarded – undo
1725 1725
 
1726 1726
 		if (!empty($context['export_javascript_inline']['standard']))
1727 1727
 		{
1728
-			$stylesheet['css_js'] .=  '
1728
+			$stylesheet['css_js'] .= '
1729 1729
 			<script><![CDATA[' . "\n" . implode("\n", $context['export_javascript_inline']['standard']) . "\n" . ']]>
1730 1730
 			</script>';
1731 1731
 		}
@@ -1737,7 +1737,7 @@  discard block
 block discarded – undo
1737 1737
 
1738 1738
 			$stylesheet['css_js'] .= "\n\t" . str_replace("\n", "\n\t", implode("\n", $context['export_javascript_inline']['defer']));
1739 1739
 
1740
-			$stylesheet['css_js'] .= "\n" . '});'. "\n" . ']]>
1740
+			$stylesheet['css_js'] .= "\n" . '});' . "\n" . ']]>
1741 1741
 			</script>';
1742 1742
 		}
1743 1743
 
@@ -1818,7 +1818,7 @@  discard block
 block discarded – undo
1818 1818
 	$css_to_minify = array();
1819 1819
 	$normal_css_files = array();
1820 1820
 
1821
-	usort($context['css_files'], function ($a, $b)
1821
+	usort($context['css_files'], function($a, $b)
1822 1822
 	{
1823 1823
 		return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
1824 1824
 	});
Please login to merge, or discard this patch.
Sources/tasks/ExportProfileData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
 		$feed_meta = array(
154 154
 			'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']),
155
-			'desc' => sentence_list(array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))),
155
+			'desc' => sentence_list(array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))),
156 156
 			'author' => $mbname,
157 157
 			'source' => $scripturl . '?action=profile;u=' . $uid,
158 158
 			'self' => '', // Unused, but can't be null.
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 					'src' => 'src="' . $currentAttachment['href'] . '" onerror="$(\'.dlattach_' . $currentAttachment['id'] . '\').show(); $(\'.dlattach_' . $currentAttachment['id'] . '\').css({\'position\': \'absolute\'});"',
641 641
 				),
642 642
 				$returnContext
643
-			) . $hidden_orig_link . '</span>' ;
643
+			) . $hidden_orig_link . '</span>';
644 644
 		}
645 645
 		elseif (strpos($currentAttachment['mime_type'], 'video/') === 0)
646 646
 		{
Please login to merge, or discard this patch.
Sources/Recent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -467,20 +467,20 @@
 block discarded – undo
467 467
 		$context['posts'][$key]['quickbuttons'] = array(
468 468
 			'reply' => array(
469 469
 				'label' => $txt['reply'],
470
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'],
470
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'],
471 471
 				'icon' => 'reply_button',
472 472
 				'show' => $post['can_reply']
473 473
 			),
474 474
 			'quote' => array(
475 475
 				'label' => $txt['quote_action'],
476
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'],
476
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'],
477 477
 				'icon' => 'quote',
478 478
 				'show' => $post['can_quote']
479 479
 			),
480 480
 			'delete' => array(
481 481
 				'label' => $txt['remove'],
482
-				'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';recent;'.$context['session_var'].'='.$context['session_id'],
483
-				'javascript' => 'data-confirm="'.$txt['remove_message'].'"',
482
+				'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';recent;' . $context['session_var'] . '=' . $context['session_id'],
483
+				'javascript' => 'data-confirm="' . $txt['remove_message'] . '"',
484 484
 				'class' => 'you_sure',
485 485
 				'icon' => 'remove_button',
486 486
 				'show' => $post['can_delete']
Please login to merge, or discard this patch.
Sources/Drafts.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -644,13 +644,13 @@  discard block
 block discarded – undo
644 644
 			'quickbuttons' => array(
645 645
 				'edit' => array(
646 646
 					'label' => $txt['draft_edit'],
647
-					'href' => $scripturl.'?action=post;'.(empty($row['id_topic']) ? 'board='.$row['id_board'] : 'topic='.$row['id_topic']).'.0;id_draft='.$row['id_draft'],
647
+					'href' => $scripturl . '?action=post;' . (empty($row['id_topic']) ? 'board=' . $row['id_board'] : 'topic=' . $row['id_topic']) . '.0;id_draft=' . $row['id_draft'],
648 648
 					'icon' => 'modify_button'
649 649
 				),
650 650
 				'delete' => array(
651 651
 					'label' => $txt['draft_delete'],
652
-					'href' => $scripturl.'?action=profile;u='.$context['member']['id'].';area=showdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'],
653
-					'javascript' => 'data-confirm="'.$txt['draft_remove'].'"',
652
+					'href' => $scripturl . '?action=profile;u=' . $context['member']['id'] . ';area=showdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'],
653
+					'javascript' => 'data-confirm="' . $txt['draft_remove'] . '"',
654 654
 					'class' => 'you_sure',
655 655
 					'icon' => 'remove_button'
656 656
 				),
@@ -837,13 +837,13 @@  discard block
 block discarded – undo
837 837
 			'quickbuttons' => array(
838 838
 				'edit' => array(
839 839
 					'label' => $txt['draft_edit'],
840
-					'href' => $scripturl.'?action=pm;sa=showpmdrafts;id_draft='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'],
840
+					'href' => $scripturl . '?action=pm;sa=showpmdrafts;id_draft=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'],
841 841
 					'icon' => 'modify_button'
842 842
 				),
843 843
 				'delete' => array(
844 844
 					'label' => $txt['draft_delete'],
845
-					'href' => $scripturl.'?action=pm;sa=showpmdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'],
846
-					'javascript' => 'data-confirm="'.$txt['draft_remove'].'?"',
845
+					'href' => $scripturl . '?action=pm;sa=showpmdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'],
846
+					'javascript' => 'data-confirm="' . $txt['draft_remove'] . '?"',
847 847
 					'class' => 'you_sure',
848 848
 					'icon' => 'remove_button'
849 849
 				),
Please login to merge, or discard this patch.
Sources/Cache/APIs/MemcachedImplementation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -181,15 +181,15 @@  discard block
 block discarded – undo
181 181
 		$class_name = $this->getImplementationClassKeyName();
182 182
 		$class_name_txt_key = strtolower($class_name);
183 183
 
184
-		$config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings'];
184
+		$config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings'];
185 185
 		$config_vars[] = array(
186 186
 			self::CLASS_KEY,
187
-			$txt['cache_'. $class_name_txt_key .'_servers'],
187
+			$txt['cache_' . $class_name_txt_key . '_servers'],
188 188
 			'file',
189 189
 			'text',
190 190
 			0,
191
-			'cache_'. $class_name_txt_key,
192
-			'subtext' => $txt['cache_'. $class_name_txt_key .'_servers_subtext']);
191
+			'cache_' . $class_name_txt_key,
192
+			'subtext' => $txt['cache_' . $class_name_txt_key . '_servers_subtext']);
193 193
 
194 194
 		if (!isset($context['settings_post_javascript']))
195 195
 			$context['settings_post_javascript'] = '';
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 		$context['settings_post_javascript'] .= '
198 198
 			$("#cache_accelerator").change(function (e) {
199 199
 				var cache_type = e.currentTarget.value;
200
-				$("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "'. $class_name .'");
200
+				$("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "' . $class_name . '");
201 201
 			});';
202 202
 	}
203 203
 
Please login to merge, or discard this patch.
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/MemcacheImplementation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -181,15 +181,15 @@  discard block
 block discarded – undo
181 181
 		$class_name = $this->getImplementationClassKeyName();
182 182
 		$class_name_txt_key = strtolower($class_name);
183 183
 
184
-		$config_vars[] = $txt['cache_'. $class_name_txt_key .'_settings'];
184
+		$config_vars[] = $txt['cache_' . $class_name_txt_key . '_settings'];
185 185
 		$config_vars[] = array(
186 186
 			self::CLASS_KEY,
187
-			$txt['cache_'. $class_name_txt_key .'_servers'],
187
+			$txt['cache_' . $class_name_txt_key . '_servers'],
188 188
 			'file',
189 189
 			'text',
190 190
 			0,
191
-			'cache_'. $class_name_txt_key,
192
-			'subtext' => $txt['cache_'. $class_name_txt_key .'_servers_subtext']);
191
+			'cache_' . $class_name_txt_key,
192
+			'subtext' => $txt['cache_' . $class_name_txt_key . '_servers_subtext']);
193 193
 
194 194
 		if (!isset($context['settings_post_javascript']))
195 195
 			$context['settings_post_javascript'] = '';
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 		$context['settings_post_javascript'] .= '
198 198
 			$("#cache_accelerator").change(function (e) {
199 199
 				var cache_type = e.currentTarget.value;
200
-				$("#'. self::CLASS_KEY .'").prop("disabled", cache_type != "'. $class_name .'");
200
+				$("#'. self::CLASS_KEY . '").prop("disabled", cache_type != "' . $class_name . '");
201 201
 			});';
202 202
 	}
203 203
 
Please login to merge, or discard this patch.