@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | // Figure out the filename we'll tell the browser. |
470 | 470 | $datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile'); |
471 | 471 | $included_desc = array_map( |
472 | - function ($datatype) use ($txt) |
|
472 | + function($datatype) use ($txt) |
|
473 | 473 | { |
474 | 474 | return $txt[$datatype]; |
475 | 475 | }, |
@@ -789,9 +789,9 @@ discard block |
||
789 | 789 | $xslt_variables = array(); |
790 | 790 | |
791 | 791 | // Do not change any of these to HTTPS URLs. For explanation, see comments in the buildXmlFeed() function. |
792 | - $smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/profile'; |
|
793 | - $xslt_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/XSL/Transform'; |
|
794 | - $html_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/xhtml'; |
|
792 | + $smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/profile'; |
|
793 | + $xslt_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/XSL/Transform'; |
|
794 | + $html_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/xhtml'; |
|
795 | 795 | |
796 | 796 | require_once($sourcedir . DIRECTORY_SEPARATOR . 'News.php'); |
797 | 797 | |
@@ -1696,14 +1696,14 @@ discard block |
||
1696 | 1696 | |
1697 | 1697 | if (!empty($context['export_css_header'])) |
1698 | 1698 | { |
1699 | - $stylesheet['css_js'] .= ' |
|
1699 | + $stylesheet['css_js'] .= ' |
|
1700 | 1700 | <style><![CDATA[' . "\n" . implode("\n", $context['export_css_header']) . "\n" . ']]> |
1701 | 1701 | </style>'; |
1702 | 1702 | } |
1703 | 1703 | |
1704 | 1704 | if (!empty($context['export_javascript_vars'])) |
1705 | 1705 | { |
1706 | - $stylesheet['css_js'] .= ' |
|
1706 | + $stylesheet['css_js'] .= ' |
|
1707 | 1707 | <script><![CDATA['; |
1708 | 1708 | |
1709 | 1709 | foreach ($context['export_javascript_vars'] as $var => $val) |
@@ -1739,7 +1739,7 @@ discard block |
||
1739 | 1739 | |
1740 | 1740 | if (!empty($context['export_javascript_inline']['standard'])) |
1741 | 1741 | { |
1742 | - $stylesheet['css_js'] .= ' |
|
1742 | + $stylesheet['css_js'] .= ' |
|
1743 | 1743 | <script><![CDATA[' . "\n" . implode("\n", $context['export_javascript_inline']['standard']) . "\n" . ']]> |
1744 | 1744 | </script>'; |
1745 | 1745 | } |
@@ -1751,7 +1751,7 @@ discard block |
||
1751 | 1751 | |
1752 | 1752 | $stylesheet['css_js'] .= "\n\t" . str_replace("\n", "\n\t", implode("\n", $context['export_javascript_inline']['defer'])); |
1753 | 1753 | |
1754 | - $stylesheet['css_js'] .= "\n" . '});'. "\n" . ']]> |
|
1754 | + $stylesheet['css_js'] .= "\n" . '});' . "\n" . ']]> |
|
1755 | 1755 | </script>'; |
1756 | 1756 | } |
1757 | 1757 | |
@@ -1834,7 +1834,7 @@ discard block |
||
1834 | 1834 | |
1835 | 1835 | usort( |
1836 | 1836 | $context['css_files'], |
1837 | - function ($a, $b) |
|
1837 | + function($a, $b) |
|
1838 | 1838 | { |
1839 | 1839 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
1840 | 1840 | } |
@@ -1865,7 +1865,7 @@ discard block |
||
1865 | 1865 | } |
1866 | 1866 | |
1867 | 1867 | // Next, we need to do for JavaScript what we just did for CSS. |
1868 | - $jQueryUrls = array ('google_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'); |
|
1868 | + $jQueryUrls = array('google_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'); |
|
1869 | 1869 | |
1870 | 1870 | if (array_key_exists($modSettings['jquery_source'], $jQueryUrls)) |
1871 | 1871 | loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery'); |
@@ -814,7 +814,7 @@ discard block |
||
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'] : '', |
@@ -2469,7 +2469,7 @@ discard block |
||
2469 | 2469 | ); |
2470 | 2470 | |
2471 | 2471 | // Add the JQuery library to the list of files to load. |
2472 | - $jQueryUrls = array ('google_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'); |
|
2472 | + $jQueryUrls = array('google_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'); |
|
2473 | 2473 | |
2474 | 2474 | if (array_key_exists($modSettings['jquery_source'], $jQueryUrls)) |
2475 | 2475 | loadJavaScriptFile($jQueryUrls[$modSettings['jquery_source']], array('external' => true, 'seed' => false), 'smf_jquery'); |
@@ -2710,8 +2710,7 @@ discard block |
||
2710 | 2710 | $context['css_files_order'] = array(); |
2711 | 2711 | |
2712 | 2712 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2713 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2714 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2713 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2715 | 2714 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2716 | 2715 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2717 | 2716 | $params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true; |
@@ -2825,8 +2824,7 @@ discard block |
||
2825 | 2824 | global $settings, $context, $modSettings, $boardurl; |
2826 | 2825 | |
2827 | 2826 | $params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ? |
2828 | - (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : |
|
2829 | - (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2827 | + (array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : ''); |
|
2830 | 2828 | $params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false; |
2831 | 2829 | $themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme'; |
2832 | 2830 | $params['async'] = isset($params['async']) ? $params['async'] : false; |
@@ -2929,7 +2927,7 @@ discard block |
||
2929 | 2927 | $elements[] = JavaScriptEscape($element); |
2930 | 2928 | } |
2931 | 2929 | |
2932 | - $value = '[' . implode(', ',$elements) . ']'; |
|
2930 | + $value = '[' . implode(', ', $elements) . ']'; |
|
2933 | 2931 | } |
2934 | 2932 | } |
2935 | 2933 | |
@@ -3610,8 +3608,7 @@ discard block |
||
3610 | 3608 | |
3611 | 3609 | // What accelerator we are going to try. |
3612 | 3610 | $cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT; |
3613 | - $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : |
|
3614 | - CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3611 | + $fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name; |
|
3615 | 3612 | |
3616 | 3613 | // Do some basic tests. |
3617 | 3614 | if (class_exists($fully_qualified_class_name)) |
@@ -3915,7 +3912,7 @@ discard block |
||
3915 | 3912 | $auth_secret = hash_file('sha256', $boarddir . '/Settings.php'); |
3916 | 3913 | |
3917 | 3914 | // Set the last error to now, but only every 15 minutes. Don't need to flood the logs. |
3918 | - if (empty($db_last_error) || ($db_last_error + 60*15) <= time()) |
|
3915 | + if (empty($db_last_error) || ($db_last_error + 60 * 15) <= time()) |
|
3919 | 3916 | { |
3920 | 3917 | updateDbLastError(time()); |
3921 | 3918 | loadLanguage('Errors'); |