Completed
Pull Request — release-2.1 (#6274)
by Mathias
04:57
created
Sources/Load.php 1 patch
Spacing   +6 added lines, -9 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'] : '',
@@ -1755,7 +1755,7 @@  discard block
 block discarded – undo
1755 1755
 		if (!empty($image))
1756 1756
 			$memberContext[$user]['avatar'] = array(
1757 1757
 				'name' => $profile['avatar'],
1758
-				'image' => '<img class="avatar" src="' . $image . '" alt="" loading="lazy" width="' . $profile['attachment_width'] . '" height = "'. $profile['attachment_height'] . '">',
1758
+				'image' => '<img class="avatar" src="' . $image . '" alt="" loading="lazy" width="' . $profile['attachment_width'] . '" height = "' . $profile['attachment_height'] . '">',
1759 1759
 				'href' => $image,
1760 1760
 				'url' => $image,
1761 1761
 			);
@@ -2720,8 +2720,7 @@  discard block
 block discarded – undo
2720 2720
 		$context['css_files_order'] = array();
2721 2721
 
2722 2722
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2723
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2724
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2723
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2725 2724
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2726 2725
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2727 2726
 	$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true;
@@ -2835,8 +2834,7 @@  discard block
 block discarded – undo
2835 2834
 	global $settings, $context, $modSettings;
2836 2835
 
2837 2836
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2838
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2839
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2837
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2840 2838
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2841 2839
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2842 2840
 	$params['async'] = isset($params['async']) ? $params['async'] : false;
@@ -3579,8 +3577,7 @@  discard block
 block discarded – undo
3579 3577
 
3580 3578
 	// What accelerator we are going to try.
3581 3579
 	$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT;
3582
-	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache :
3583
-		CacheApi::APIS_NAMESPACE . $cache_class_name;
3580
+	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name;
3584 3581
 
3585 3582
 	// Do some basic tests.
3586 3583
 	if (class_exists($fully_qualified_class_name))
@@ -3884,7 +3881,7 @@  discard block
 block discarded – undo
3884 3881
 			$auth_secret = hash_file('sha256', $boarddir . '/Settings.php');
3885 3882
 
3886 3883
 			// Set the last error to now, but only every 15 minutes.  Don't need to flood the logs.
3887
-			if (empty($db_last_error) || ($db_last_error + 60*15) <= time())
3884
+			if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time())
3888 3885
 			{
3889 3886
 				updateDbLastError(time());
3890 3887
 				loadLanguage('Errors');
Please login to merge, or discard this patch.