Completed
Pull Request — release-2.1 (#5058)
by 01
120:18 queued 71:00
created
other/install.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1697,8 +1697,7 @@  discard block
 block discarded – undo
1697 1697
 	updateStats('topic');
1698 1698
 
1699 1699
 	// This function is needed to do the updateStats('subject') call.
1700
-	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' :
1701
-		function($string){
1700
+	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) {
1702 1701
 			global $sourcedir;
1703 1702
 			if (function_exists('mb_strtolower'))
1704 1703
 				return mb_strtolower($string, 'UTF-8');
@@ -1767,7 +1766,7 @@  discard block
 block discarded – undo
1767 1766
 		if (trim($settingsArray[$i]) == 'if (file_exists(dirname(__FILE__) . \'/install.php\'))' && trim($settingsArray[$i + 1]) == '{' && trim($settingsArray[$i + 9]) == '}')
1768 1767
 		{
1769 1768
 			// Set the ten lines to nothing.
1770
-			for ($j=0; $j < 10; $j++)
1769
+			for ($j = 0; $j < 10; $j++)
1771 1770
 				$settingsArray[$i++] = '';
1772 1771
 
1773 1772
 			continue;
Please login to merge, or discard this patch.
Themes/default/GenericControls.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@
 block discarded – undo
300 300
 				echo '
301 301
 				<div class="g-recaptcha centertext" data-sitekey="' . $verify_context['recaptcha_site_key'] . '" data-theme="' . $verify_context['recaptcha_theme'] . '"></div>
302 302
 				<br>
303
-				<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl='.$lang.'"></script>';
303
+				<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl='.$lang . '"></script>';
304 304
 			}
305 305
 		}
306 306
 		else
Please login to merge, or discard this patch.
Sources/DbPackages-mysql.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
 		{
127 127
 			$smcFunc['db_transaction']('begin');
128 128
 			$db_trans = true;
129
-			$smcFunc['db_drop_table']($table_name.'_old');
130
-			$smcFunc['db_query']('','
131
-				RENAME TABLE '. $table_name .' TO ' . $table_name . '_old',
129
+			$smcFunc['db_drop_table']($table_name . '_old');
130
+			$smcFunc['db_query']('', '
131
+				RENAME TABLE '. $table_name . ' TO ' . $table_name . '_old',
132 132
 				array(
133 133
 					'security_override' => true,
134 134
 				)
@@ -202,15 +202,15 @@  discard block
 block discarded – undo
202 202
 	{
203 203
 		$same_col = array();
204 204
 
205
-		$request = $smcFunc['db_query']('','
205
+		$request = $smcFunc['db_query']('', '
206 206
 			SELECT count(*), column_name
207 207
 			FROM information_schema.columns
208 208
 			WHERE table_name in ({string:table1},{string:table2}) AND table_schema = {string:schema}
209 209
 			GROUP BY column_name
210 210
 			HAVING count(*) > 1',
211
-			array (
211
+			array(
212 212
 				'table1' => $table_name,
213
-				'table2' => $table_name.'_old',
213
+				'table2' => $table_name . '_old',
214 214
 				'schema' => $db_name,
215 215
 			)
216 216
 		);
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
 			$same_col[] = $row['column_name'];
221 221
 		}
222 222
 
223
-		$smcFunc['db_query']('','
224
-			INSERT INTO ' . $table_name .'('
223
+		$smcFunc['db_query']('', '
224
+			INSERT INTO ' . $table_name . '('
225 225
 			. implode($same_col, ',') .
226 226
 			')
227 227
 			SELECT '. implode($same_col, ',') . '
Please login to merge, or discard this patch.
SSI.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
  *
105 105
  * @param string $class The fully-qualified class name.
106 106
  */
107
-spl_autoload_register(function ($class) use ($sourcedir)
107
+spl_autoload_register(function($class) use ($sourcedir)
108 108
 {
109 109
 	$classMap = array(
110 110
 		'ReCaptcha\\' => 'ReCaptcha/',
Please login to merge, or discard this patch.
Sources/Subs-Auth.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -430,8 +430,8 @@
 block discarded – undo
430 430
 	$real_name = $smcFunc['db_case_sensitive'] ? 'LOWER(real_name)' : 'real_name';
431 431
 
432 432
 	// Searches.
433
-	$member_name_search = $member_name . ' ' . $comparison . ' ' . implode( ' OR ' . $member_name . ' ' . $comparison . ' ', $names_list);
434
-	$real_name_search = $real_name . ' ' . $comparison . ' ' . implode( ' OR ' . $real_name . ' ' . $comparison . ' ', $names_list);
433
+	$member_name_search = $member_name . ' ' . $comparison . ' ' . implode(' OR ' . $member_name . ' ' . $comparison . ' ', $names_list);
434
+	$real_name_search = $real_name . ' ' . $comparison . ' ' . implode(' OR ' . $real_name . ' ' . $comparison . ' ', $names_list);
435 435
 
436 436
 	// Search by username, display name, and email address.
437 437
 	$request = $smcFunc['db_query']('', '
Please login to merge, or discard this patch.
Sources/Display.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -899,13 +899,13 @@
 block discarded – undo
899 899
 		if ($start_char === 'C')
900 900
 			$limit_seek = $limit;
901 901
 		else
902
-			$limit_seek  = $limit + 1;
902
+			$limit_seek = $limit + 1;
903 903
 
904 904
 		$request = $smcFunc['db_query']('', '
905 905
 			SELECT id_msg, id_member, approved
906 906
 			FROM {db_prefix}messages
907 907
 			WHERE id_topic = {int:current_topic}
908
-			AND id_msg '. $page_operator . ' {int:page_id}'. (!$modSettings['postmod_active'] || $approve_posts ? '' : '
908
+			AND id_msg '. $page_operator . ' {int:page_id}' . (!$modSettings['postmod_active'] || $approve_posts ? '' : '
909 909
 			AND (approved = {int:is_approved}' . ($user_info['is_guest'] ? '' : ' OR id_member = {int:current_member}') . ')') . '
910 910
 			ORDER BY id_msg ' . ($ascending_seek ? '' : 'DESC') . ($context['messages_per_page'] == -1 ? '' : '
911 911
 			LIMIT {int:limit}'),
Please login to merge, or discard this patch.
Sources/Logging.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * @return array The truncated array
25 25
  */
26
-function truncateArray($arr, $max_length=1900)
26
+function truncateArray($arr, $max_length = 1900)
27 27
 {
28 28
 	$curr_length = 0;
29 29
 	foreach ($arr as $key => $value)
30 30
 		if (is_array($value))
31 31
 			foreach ($value as $key2 => $value2)
32
-				$curr_length += strlen ($value2);
32
+				$curr_length += strlen($value2);
33 33
 		else
34
-			$curr_length += strlen ($value);
34
+			$curr_length += strlen($value);
35 35
 	if ($curr_length <= $max_length)
36 36
 		return $arr;
37 37
 	else
38 38
 	{
39 39
 		// Truncate each element's value to a reasonable length
40
-		$param_max = floor($max_length/count($arr));
40
+		$param_max = floor($max_length / count($arr));
41 41
 		foreach ($arr as $key => &$value)
42 42
 			if (is_array($value))
43 43
 				foreach ($value as $key2 => &$value2)
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 	if (filemtime($cachedir . '/db_last_error.php') === $last_db_error_change)
208 208
 	{
209 209
 		// Write the change
210
-		$write_db_change =  '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>';
210
+		$write_db_change = '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>';
211 211
 		$written_bytes = file_put_contents($cachedir . '/db_last_error.php', $write_db_change, LOCK_EX);
212 212
 
213 213
 		// survey says ...
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	', $txt['debug_language_files'], count($context['debug']['language_files']), ': <em>', implode('</em>, <em>', $context['debug']['language_files']), '</em>.<br>
281 281
 	', $txt['debug_stylesheets'], count($context['debug']['sheets']), ': <em>', implode('</em>, <em>', $context['debug']['sheets']), '</em>.<br>
282 282
 	', $txt['debug_hooks'], empty($context['debug']['hooks']) ? 0 : count($context['debug']['hooks']) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_hooks\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_hooks" style="display: none;"><em>' . implode('</em>, <em>', $context['debug']['hooks']), '</em></span>)', '<br>
283
-	',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">'. $txt['debug_show'] .'</a><span id="debug_instances" style="display: none;"><em>'. implode('</em>, <em>', array_keys($context['debug']['instances'])) .'</em></span>)'. '<br>') : ''),'
283
+	',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">' . $txt['debug_show'] . '</a><span id="debug_instances" style="display: none;"><em>' . implode('</em>, <em>', array_keys($context['debug']['instances'])) . '</em></span>)' . '<br>') : ''), '
284 284
 	', $txt['debug_files_included'], count($files), ' - ', round($total_size / 1024), $txt['debug_kb'], ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_include_info\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_include_info" style="display: none;"><em>', implode('</em>, <em>', $files), '</em></span>)<br>';
285 285
 
286 286
 	if (function_exists('memory_get_peak_usage'))
Please login to merge, or discard this patch.
Sources/ManageMembers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 			// INET.
361 361
 			elseif ($param_info['type'] == 'inet')
362 362
 			{
363
-				if(count($search_params[$param_name]) === 1)
363
+				if (count($search_params[$param_name]) === 1)
364 364
 				{
365 365
 					$query_parts[] = '(' . $param_info['db_fields'][0] . ' = {inet:' . $param_name . '})';
366 366
 					$where_params[$param_name] = $search_params[$param_name][0];
@@ -368,8 +368,8 @@  discard block
 block discarded – undo
368 368
 				elseif (count($search_params[$param_name]) === 2)
369 369
 				{
370 370
 					$query_parts[] = '(' . $param_info['db_fields'][0] . ' <= {inet:' . $param_name . '_high} and ' . $param_info['db_fields'][0] . ' >= {inet:' . $param_name . '_low})';
371
-					$where_params[$param_name.'_low'] = $search_params[$param_name]['low'];
372
-					$where_params[$param_name.'_high'] = $search_params[$param_name]['high'];
371
+					$where_params[$param_name . '_low'] = $search_params[$param_name]['low'];
372
+					$where_params[$param_name . '_high'] = $search_params[$param_name]['high'];
373 373
 				}
374 374
 				
375 375
 			}
Please login to merge, or discard this patch.
Sources/Who.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 						'Jessica "Suki" Gonz&aacute;lez',
593 593
 						'Karl "RegularExpression" Benson',
594 594
 						'Matthew "Labradoodle-360" Kerle',
595
-						$user_info['is_admin'] ? 'Matt "Grudge" Wolf': 'Grudge',
595
+						$user_info['is_admin'] ? 'Matt "Grudge" Wolf' : 'Grudge',
596 596
 						'Michael "Thantos" Miller',
597 597
 						'Norv',
598 598
 						'Peter "Arantor" Spicer',
@@ -824,13 +824,13 @@  discard block
 block discarded – undo
824 824
 			$credit_info = $smcFunc['json_decode']($row['credits'], true);
825 825
 
826 826
 			$copyright = empty($credit_info['copyright']) ? '' : $txt['credits_copyright'] . ' &copy; ' . $smcFunc['htmlspecialchars']($credit_info['copyright']);
827
-			$license = empty($credit_info['license']) ? '' : $txt['credits_license'] . ': ' . (!empty($credit_info['licenseurl']) ? '<a href="'. $smcFunc['htmlspecialchars']($credit_info['licenseurl']) .'">'. $smcFunc['htmlspecialchars']($credit_info['license']) .'</a>' : $smcFunc['htmlspecialchars']($credit_info['license']));
827
+			$license = empty($credit_info['license']) ? '' : $txt['credits_license'] . ': ' . (!empty($credit_info['licenseurl']) ? '<a href="' . $smcFunc['htmlspecialchars']($credit_info['licenseurl']) . '">' . $smcFunc['htmlspecialchars']($credit_info['license']) . '</a>' : $smcFunc['htmlspecialchars']($credit_info['license']));
828 828
 			$version = $txt['credits_version'] . ' ' . $row['version'];
829 829
 			$title = (empty($credit_info['title']) ? $row['name'] : $smcFunc['htmlspecialchars']($credit_info['title'])) . ': ' . $version;
830 830
 
831 831
 			// build this one out and stash it away
832 832
 			$mod_name = empty($credit_info['url']) ? $title : '<a href="' . $credit_info['url'] . '">' . $title . '</a>';
833
-			$mods[] = $mod_name . (!empty($license) ? ' | ' . $license  : '') . (!empty($copyright) ? ' | ' . $copyright  : '');
833
+			$mods[] = $mod_name . (!empty($license) ? ' | ' . $license : '') . (!empty($copyright) ? ' | ' . $copyright : '');
834 834
 		}
835 835
 		cache_put_data('mods_credits', $mods, 86400);
836 836
 	}
Please login to merge, or discard this patch.