diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/adm/style/overall_footer.html | 4 | ||||
-rw-r--r-- | phpBB/adm/style/overall_header.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/simple_footer.html | 2 | ||||
-rw-r--r-- | phpBB/adm/style/simple_header.html | 2 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 7 | ||||
-rw-r--r-- | phpBB/includes/style/template_filter.php | 4 | ||||
-rw-r--r-- | phpBB/install/database_update.php | 11 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/overall_footer.html | 4 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/overall_header.html | 8 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/simple_footer.html | 2 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/simple_header.html | 8 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/overall_footer.html | 2 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/simple_footer.html | 2 |
13 files changed, 36 insertions, 22 deletions
diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 0d88c8bcc5..2bc9ee52d7 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -37,8 +37,8 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> -<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js"></script> +<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS ajax.js --> {SCRIPTS} diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index be5ac29131..f79c0318b5 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -5,7 +5,7 @@ <!-- IF META -->{META}<!-- ENDIF --> <title>{PAGE_TITLE}</title> -<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" /> +<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index b6d7ee2f5c..1d5c62b0a3 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -17,7 +17,7 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> </body> </html> diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html index 84ff665acc..d4cbcb6cbe 100644 --- a/phpBB/adm/style/simple_header.html +++ b/phpBB/adm/style/simple_header.html @@ -5,7 +5,7 @@ <!-- IF META -->{META}<!-- ENDIF --> <title>{PAGE_TITLE}</title> -<link href="style/admin.css" rel="stylesheet" type="text/css" media="screen" /> +<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 9a6af29d69..a13605f688 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4767,6 +4767,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'S_SEARCH_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields), + 'T_ASSETS_VERSION' => $config['assets_version'], 'T_ASSETS_PATH' => "{$web_path}assets", 'T_THEME_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme', 'T_TEMPLATE_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/template', @@ -4778,10 +4779,10 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0 'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/", 'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/", 'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/", - 'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme/stylesheet.css', - 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css', + 'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'], + 'T_STYLESHEET_LANG_LINK' => "{$web_path}styles/" . rawurlencode($user->theme['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'], 'T_STYLESHEET_NAME' => $user->theme['style_name'], - 'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js", + 'T_JQUERY_LINK' => ($config['load_jquery_cdn'] && !empty($config['load_jquery_url'])) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery.js?assets_version=" . $config['assets_version'], 'S_JQUERY_FALLBACK' => ($config['load_jquery_cdn']) ? true : false, 'T_THEME_NAME' => rawurlencode($user->theme['style_path']), diff --git a/phpBB/includes/style/template_filter.php b/phpBB/includes/style/template_filter.php index d62ad0ba1e..f9bbcce4b2 100644 --- a/phpBB/includes/style/template_filter.php +++ b/phpBB/includes/style/template_filter.php @@ -882,6 +882,8 @@ class phpbb_style_template_filter extends php_user_filter */ private function compile_tag_include_js($tag_args) { + global $config; + // Process dynamic includes if ($tag_args[0] == '{') { @@ -894,7 +896,7 @@ class phpbb_style_template_filter extends php_user_filter } // Locate file - $filename = $this->locator->get_first_file_location(array($tag_args), false, true); + $filename = $this->locator->get_first_file_location(array($tag_args), false, true) . '?assets_version=' . $config['assets_version']; if ($filename === false) { diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index be39b12d12..5368ec06bb 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -189,6 +189,12 @@ $config = new phpbb_config_db($db, $cache->get_driver(), CONFIG_TABLE); set_config(null, null, null, $config); set_config_count(null, null, null, $config); +// Update asset_version +if (isset($config['assets_version'])) +{ + set_config('assets_version', $config['assets_version'] + 1); +} + // phpbb_db_tools will be taken from new files (under install/update/new) // if possible, falling back to the board's copy. $db_tools = new phpbb_db_tools($db, true); @@ -2424,6 +2430,11 @@ function change_database_data(&$no_updates, $version) $no_updates = false; + if (!isset($config['assets_version'])) + { + $config->set('assets_version', '1'); + } + break; } } diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index d342b25a2a..1e7739b274 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -50,8 +50,8 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> -<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js"></script> +<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"</script> <!-- INCLUDEJS template/ajax.js --> {SCRIPTS} diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 53a633b326..349309ab4e 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -70,18 +70,18 @@ // ]]> </script> -<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script> +<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script> -<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" /> +<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" /> <link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> <link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> <!-- IF S_CONTENT_DIRECTION eq 'rtl' --> - <link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" /> + <link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" /> <!-- ENDIF --> <!--[if lte IE 8]> - <link href="{T_THEME_PATH}/tweaks.css" rel="stylesheet" type="text/css" media="screen, projection" /> + <link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" /> <![endif]--> </head> diff --git a/phpBB/styles/prosilver/template/simple_footer.html b/phpBB/styles/prosilver/template/simple_footer.html index 64dd2ff96b..897e50ced7 100644 --- a/phpBB/styles/prosilver/template/simple_footer.html +++ b/phpBB/styles/prosilver/template/simple_footer.html @@ -7,7 +7,7 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> {SCRIPTS} </body> diff --git a/phpBB/styles/prosilver/template/simple_header.html b/phpBB/styles/prosilver/template/simple_header.html index f0dcbed5a4..5440d66520 100644 --- a/phpBB/styles/prosilver/template/simple_header.html +++ b/phpBB/styles/prosilver/template/simple_header.html @@ -40,18 +40,18 @@ // ]]> </script> -<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script> +<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js?assets_version={T_ASSETS_VERSION}"></script> -<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" /> +<link href="{T_THEME_PATH}/print.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="print" title="printonly" /> <link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> <link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet" type="text/css" media="screen, projection" /> <!-- IF S_CONTENT_DIRECTION eq 'rtl' --> - <link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" /> + <link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" /> <!-- ENDIF --> <!--[if lte IE 8]> - <link href="{T_THEME_PATH}/tweaks.css" rel="stylesheet" type="text/css" media="screen, projection" /> + <link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen, projection" /> <![endif]--> <!-- DEFINE $POPUP = 1 --> diff --git a/phpBB/styles/subsilver2/template/overall_footer.html b/phpBB/styles/subsilver2/template/overall_footer.html index 4f686cf5e4..24c6f8105c 100644 --- a/phpBB/styles/subsilver2/template/overall_footer.html +++ b/phpBB/styles/subsilver2/template/overall_footer.html @@ -9,7 +9,7 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> {SCRIPTS} </body> diff --git a/phpBB/styles/subsilver2/template/simple_footer.html b/phpBB/styles/subsilver2/template/simple_footer.html index 771765ee12..6082b71891 100644 --- a/phpBB/styles/subsilver2/template/simple_footer.html +++ b/phpBB/styles/subsilver2/template/simple_footer.html @@ -6,7 +6,7 @@ </div> <script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> +<!-- IF S_JQUERY_FALLBACK --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF --> {SCRIPTS} </body> |