Passed
Pull Request — release-2.1 (#6939)
by
unknown
04:58
created
Sources/Load.php 1 patch
Spacing   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
 			'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'],
815 815
 			'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1,
816 816
 			'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0,
817
-			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0,
817
+			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0,
818 818
 			'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0,
819 819
 		),
820 820
 		'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '',
@@ -2471,7 +2471,7 @@  discard block
 block discarded – undo
2471 2471
 	);
2472 2472
 
2473 2473
 	// Add the JQuery library to the list of files to load.
2474
-	$jQueryUrls = array ('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/'. JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-'. JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-'. JQUERY_VERSION . '.min.js');
2474
+	$jQueryUrls = array('cdn' => 'https://ajax.googleapis.com/ajax/libs/jquery/' . JQUERY_VERSION . '/jquery.min.js', 'jquery_cdn' => 'https://code.jquery.com/jquery-' . JQUERY_VERSION . '.min.js', 'microsoft_cdn' => 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-' . JQUERY_VERSION . '.min.js');
2475 2475
 
2476 2476
 	// If nothing set yet, default to the local copy
2477 2477
 	if (!isset($modSettings['jquery_source']))
@@ -2716,8 +2716,7 @@  discard block
 block discarded – undo
2716 2716
 		$context['css_files_order'] = array();
2717 2717
 
2718 2718
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2719
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2720
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2719
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2721 2720
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2722 2721
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2723 2722
 	$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true;
@@ -2832,8 +2831,7 @@  discard block
 block discarded – undo
2832 2831
 	global $settings, $context, $modSettings;
2833 2832
 
2834 2833
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2835
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2836
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2834
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2837 2835
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2838 2836
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2839 2837
 	$params['async'] = isset($params['async']) ? $params['async'] : false;
@@ -2938,7 +2936,7 @@  discard block
 block discarded – undo
2938 2936
 					$elements[] = JavaScriptEscape($element);
2939 2937
 			}
2940 2938
 
2941
-			$value = '[' . implode(', ',$elements) . ']';
2939
+			$value = '[' . implode(', ', $elements) . ']';
2942 2940
 		}
2943 2941
 	}
2944 2942
 
@@ -3619,8 +3617,7 @@  discard block
 block discarded – undo
3619 3617
 
3620 3618
 	// What accelerator we are going to try.
3621 3619
 	$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT;
3622
-	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache :
3623
-		CacheApi::APIS_NAMESPACE . $cache_class_name;
3620
+	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name;
3624 3621
 
3625 3622
 	// Do some basic tests.
3626 3623
 	if (class_exists($fully_qualified_class_name))
@@ -3924,7 +3921,7 @@  discard block
 block discarded – undo
3924 3921
 			$auth_secret = hash_file('sha256', $boarddir . '/Settings.php');
3925 3922
 
3926 3923
 			// Set the last error to now, but only every 15 minutes.  Don't need to flood the logs.
3927
-			if (empty($db_last_error) || ($db_last_error + 60*15) <= time())
3924
+			if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time())
3928 3925
 			{
3929 3926
 				updateDbLastError(time());
3930 3927
 				loadLanguage('Errors');
Please login to merge, or discard this patch.