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/Profile-Export.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1396,7 +1396,9 @@
 block discarded – undo
1396 1396
 
1397 1397
 	// Figure out the filename we'll tell the browser.
1398 1398
 	$datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile');
1399
-	$included_desc = array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes);
1399
+	$included_desc = array_map(function ($datatype) use ($txt)
1400
+	{
1401
+return $txt[$datatype]; }, $datatypes);
1400 1402
 
1401 1403
 	$dlfilename = array_merge(array($context['forum_name'], $context['member']['username']), $included_desc);
1402 1404
 	$dlfilename = preg_replace('/[^\p{L}\p{M}\p{N}_]+/u', '-', str_replace('"', '', un_htmlspecialchars(strip_tags(implode('_', $dlfilename)))));
Please login to merge, or discard this 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 2 patches
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.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,9 @@
 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)
156
+			{
157
+return $txt[$datatype]; }, array_keys($included))),
156 158
 			'author' => $mbname,
157 159
 			'source' => $scripturl . '?action=profile;u=' . $uid,
158 160
 			'self' => '', // Unused, but can't be null.
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/ManageServer.php 2 patches
Braces   -1 removed lines patch added patch discarded remove patch
@@ -707,7 +707,6 @@
 block discarded – undo
707 707
 		$cache_level = array($txt['cache_off']);
708 708
 		$apis_names['none'] = $txt['cache_off'];
709 709
 	}
710
-
711 710
 	else
712 711
 	{
713 712
 		$txt['cache_settings_message'] = '<strong class="success">' .
Please login to merge, or discard this 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/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.
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.