diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-07 19:43:29 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-07 19:43:29 +0000 |
commit | 66b7a5cb74d45c2e94b021aff1a24d3b83ca8501 (patch) | |
tree | e61ce5e2d9253e18d2835b34d4d35d45dc4587e2 /update.php | |
parent | 8ea4186e71c7e50046a7f20effdec6c68125da9d (diff) | |
download | brdo-66b7a5cb74d45c2e94b021aff1a24d3b83ca8501.tar.gz brdo-66b7a5cb74d45c2e94b021aff1a24d3b83ca8501.tar.bz2 |
#199946 by JirkaRybka: append a short query string to CSS and JS files, changing on upgrades, so on core/module/theme upgrades, browser caches will 'flush'
Diffstat (limited to 'update.php')
-rw-r--r-- | update.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/update.php b/update.php index 235eed624..3ddf10435 100644 --- a/update.php +++ b/update.php @@ -13,6 +13,12 @@ * be sure to open settings.php again, and change it back to its original state! */ +/** + * Global flag to identify update.php run, and so avoid various unwanted + * operations, such as hook_init() and hook_exit() invokes, css/js preprocessing + * and translation, and solve some theming issues. This flag is checked on several + * places in Drupal code (not just update.php). + */ define('MAINTENANCE_MODE', 'update'); /** @@ -264,11 +270,7 @@ function update_batch() { function update_finished($success, $results, $operations) { // clear the caches in case the data has been updated. - cache_clear_all('*', 'cache', TRUE); - cache_clear_all('*', 'cache_page', TRUE); - cache_clear_all('*', 'cache_filter', TRUE); - drupal_clear_css_cache(); - drupal_clear_js_cache(); + drupal_flush_all_caches(); $_SESSION['update_results'] = $results; $_SESSION['update_success'] = $success; @@ -340,6 +342,9 @@ function update_results_page() { } function update_info_page() { + // Change query-strings on css/js files to enforce reload for all users. + _drupal_flush_css_js(); + update_task_list('info'); drupal_set_title('Drupal database update'); $output = '<p>Use this utility to update your database whenever a new release of Drupal or a module is installed.</p><p>For more detailed information, see the <a href="http://drupal.org/node/258">Installation and upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.</p>'; @@ -516,11 +521,6 @@ ini_set('display_errors', FALSE); include_once './includes/bootstrap.inc'; -// Bootstrap Drupal in a safe way, without calling hook_init() and hook_exit(), -// to avoid possible warnings. We need to set the global variable after -// DRUPAL_BOOTSTRAP_CONFIGURATION, which unsets globals, but before the rest. -drupal_bootstrap(DRUPAL_BOOTSTRAP_CONFIGURATION); -$update_mode = TRUE; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_maintenance_theme(); |