Passed
Push — release-2.1 ( d2068d...00d95b )
by Jon
04:25 queued 13s
created
Sources/Load.php 2 patches
Spacing   +6 added lines, -9 removed lines patch added patch discarded remove patch
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
 			'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'],
854 854
 			'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1,
855 855
 			'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0,
856
-			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0,
856
+			'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0,
857 857
 			'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0,
858 858
 		),
859 859
 		'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '',
@@ -2539,7 +2539,7 @@  discard block
 block discarded – undo
2539 2539
 	);
2540 2540
 
2541 2541
 	// Add the JQuery library to the list of files to load.
2542
-	$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');
2542
+	$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');
2543 2543
 
2544 2544
 	if (isset($modSettings['jquery_source']) && array_key_exists($modSettings['jquery_source'], $jQueryUrls))
2545 2545
 		loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery');
@@ -2780,8 +2780,7 @@  discard block
 block discarded – undo
2780 2780
 		$context['css_files_order'] = array();
2781 2781
 
2782 2782
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2783
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2784
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2783
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2785 2784
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2786 2785
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2787 2786
 	$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true;
@@ -2896,8 +2895,7 @@  discard block
 block discarded – undo
2896 2895
 	global $settings, $context, $modSettings;
2897 2896
 
2898 2897
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2899
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2900
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2898
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2901 2899
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2902 2900
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2903 2901
 	$params['async'] = isset($params['async']) ? $params['async'] : false;
@@ -3687,8 +3685,7 @@  discard block
 block discarded – undo
3687 3685
 
3688 3686
 	// What accelerator we are going to try.
3689 3687
 	$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT;
3690
-	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache :
3691
-		CacheApi::APIS_NAMESPACE . $cache_class_name;
3688
+	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name;
3692 3689
 
3693 3690
 	// Do some basic tests.
3694 3691
 	if (class_exists($fully_qualified_class_name))
@@ -3992,7 +3989,7 @@  discard block
 block discarded – undo
3992 3989
 			$auth_secret = hash_file('sha256', $boarddir . '/Settings.php');
3993 3990
 
3994 3991
 			// Set the last error to now, but only every 15 minutes.  Don't need to flood the logs.
3995
-			if (empty($db_last_error) || ($db_last_error + 60*15) <= time())
3992
+			if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time())
3996 3993
 			{
3997 3994
 				updateDbLastError(time());
3998 3995
 				loadLanguage('Errors');
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	// Set a list of common functions.
108 108
 	$ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);';
109 109
 	$ent_check = empty($modSettings['disableEntityCheck']) ? function($string)
110
-		{
110
+	{
111 111
 			$string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', (string) $string);
112 112
 			return $string;
113 113
 		} : function($string)
@@ -2422,7 +2422,6 @@  discard block
 block discarded – undo
2422 2422
 		loadLanguage('index+Modifications');
2423 2423
 		$context['template_layers'] = array();
2424 2424
 	}
2425
-
2426 2425
 	else
2427 2426
 	{
2428 2427
 		// Custom templates to load, or just default?
@@ -2976,7 +2975,8 @@  discard block
 block discarded – undo
2976 2975
 	// Take care of escaping the value for JavaScript?
2977 2976
 	if (!empty($escape))
2978 2977
 	{
2979
-		switch (gettype($value)) {
2978
+		switch (gettype($value))
2979
+		{
2980 2980
 			// Illegal.
2981 2981
 			case 'resource':
2982 2982
 				break;
Please login to merge, or discard this patch.