|
@@ -834,7 +834,7 @@ discard block |
|
|
block discarded – undo |
|
834
|
834
|
'filename' => empty($user_settings['filename']) ? '' : $user_settings['filename'], |
|
835
|
835
|
'custom_dir' => !empty($user_settings['attachment_type']) && $user_settings['attachment_type'] == 1, |
|
836
|
836
|
'id_attach' => isset($user_settings['id_attach']) ? $user_settings['id_attach'] : 0, |
|
837
|
|
- 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width']: 0, |
|
|
837
|
+ 'width' => isset($user_settings['attachment_width']) > 0 ? $user_settings['attachment_width'] : 0, |
|
838
|
838
|
'height' => isset($user_settings['attachment_height']) > 0 ? $user_settings['attachment_height'] : 0, |
|
839
|
839
|
), |
|
840
|
840
|
'smiley_set' => isset($user_settings['smiley_set']) ? $user_settings['smiley_set'] : '', |
|
@@ -2492,7 +2492,7 @@ discard block |
|
|
block discarded – undo |
|
2492
|
2492
|
); |
|
2493
|
2493
|
|
|
2494
|
2494
|
// Add the JQuery library to the list of files to load. |
|
2495
|
|
- $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'); |
|
|
2495
|
+ $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'); |
|
2496
|
2496
|
|
|
2497
|
2497
|
if (isset($modSettings['jquery_source']) && array_key_exists($modSettings['jquery_source'], $jQueryUrls)) |
|
2498
|
2498
|
loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery'); |
|
@@ -2733,8 +2733,7 @@ discard block |
|
|
block discarded – undo |
|
2733
|
2733
|
$context['css_files_order'] = array(); |
|
2734
|
2734
|
|
|
2735
|
2735
|
$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
|
2736
|
|
- (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2737
|
|
- (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
|
2736
|
+ (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2738
|
2737
|
$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
|
2739
|
2738
|
$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
|
2740
|
2739
|
$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true; |
|
@@ -2849,8 +2848,7 @@ discard block |
|
|
block discarded – undo |
|
2849
|
2848
|
global $settings, $context, $modSettings; |
|
2850
|
2849
|
|
|
2851
|
2850
|
$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
|
2852
|
|
- (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2853
|
|
- (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
|
2851
|
+ (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2854
|
2852
|
$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
|
2855
|
2853
|
$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
|
2856
|
2854
|
$params['async'] = isset($params['async']) ? $params['async'] : false; |
|
@@ -2955,7 +2953,7 @@ discard block |
|
|
block discarded – undo |
|
2955
|
2953
|
$elements[] = JavaScriptEscape($element); |
|
2956
|
2954
|
} |
|
2957
|
2955
|
|
|
2958
|
|
- $value = '[' . implode(', ',$elements) . ']'; |
|
|
2956
|
+ $value = '[' . implode(', ', $elements) . ']'; |
|
2959
|
2957
|
} |
|
2960
|
2958
|
} |
|
2961
|
2959
|
|
|
@@ -3636,8 +3634,7 @@ discard block |
|
|
block discarded – undo |
|
3636
|
3634
|
|
|
3637
|
3635
|
// What accelerator we are going to try. |
|
3638
|
3636
|
$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT; |
|
3639
|
|
- $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : |
|
3640
|
|
- CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
|
3637
|
+ $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3641
|
3638
|
|
|
3642
|
3639
|
// Do some basic tests. |
|
3643
|
3640
|
if (class_exists($fully_qualified_class_name)) |
|
@@ -3884,7 +3881,7 @@ discard block |
|
|
block discarded – undo |
|
3884
|
3881
|
// External url. |
|
3885
|
3882
|
else |
|
3886
|
3883
|
{ |
|
3887
|
|
- $parsed_image = parse_iri($data['avatar']. PHP_URL_SCHEME); |
|
|
3884
|
+ $parsed_image = parse_iri($data['avatar'] . PHP_URL_SCHEME); |
|
3888
|
3885
|
$image = is_array($parsed_image) ? get_proxied_url($data['avatar']) : $modSettings['avatar_url'] . '/' . $data['avatar']; |
|
3889
|
3886
|
} |
|
3890
|
3887
|
} |
|
@@ -3944,7 +3941,7 @@ discard block |
|
|
block discarded – undo |
|
3944
|
3941
|
$auth_secret = hash_file('sha256', $boarddir . '/Settings.php'); |
|
3945
|
3942
|
|
|
3946
|
3943
|
// Set the last error to now, but only every 15 minutes. Don't need to flood the logs. |
|
3947
|
|
- if (empty($db_last_error) || ($db_last_error + 60*15) <= time()) |
|
|
3944
|
+ if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time()) |
|
3948
|
3945
|
{ |
|
3949
|
3946
|
updateDbLastError(time()); |
|
3950
|
3947
|
loadLanguage('Errors'); |