From 6b01b6a07ab38d61bae8396deec625b5f3b40eb5 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 17 Nov 2005 05:32:55 +0000 Subject: [PATCH] Flush the cache for upgrades. Flesh out __get_option(). git-svn-id: http://svn.automattic.com/wordpress/trunk@3129 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/upgrade-functions.php | 6 ++++++ wp-admin/upgrade.php | 2 ++ 2 files changed, 8 insertions(+) diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 01d10383a2..f95e741b00 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -414,6 +414,12 @@ function __get_option($setting) { $option = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'"); + if ( 'home' == $setting && '' == $value ) + return __get_option('siteurl'); + + if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting ) + $option = preg_replace('|/+$|', '', $option); + @ $kellogs = unserialize($option); if ($kellogs !== FALSE) return $kellogs; diff --git a/wp-admin/upgrade.php b/wp-admin/upgrade.php index 7360f62863..63bcf8ff11 100644 --- a/wp-admin/upgrade.php +++ b/wp-admin/upgrade.php @@ -74,8 +74,10 @@ switch($step) { break; case 1: + wp_cache_flush(); make_db_current_silent(); upgrade_all(); + wp_cache_flush(); ?>

Have fun!"), __get_option('home')); ?>