summaryrefslogtreecommitdiffstats
path: root/wp-includes/wpmu-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-07-04 16:09:49 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-07-04 16:09:49 +0000
commit6c8dfff91cd6b8748aaceb8b62dc2d53db997604 (patch)
treef9064253b5fa1e02d0bc3545be77bc13ee5f3b32 /wp-includes/wpmu-functions.php
parent0bdecc24986ee6e8ec2afb888607ffc7b609ff0d (diff)
downloadwordpress-mu-6c8dfff91cd6b8748aaceb8b62dc2d53db997604.tar.gz
wordpress-mu-6c8dfff91cd6b8748aaceb8b62dc2d53db997604.tar.xz
wordpress-mu-6c8dfff91cd6b8748aaceb8b62dc2d53db997604.zip
$switch before we get_option in get_blog_option()
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@634 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/wpmu-functions.php')
-rw-r--r--wp-includes/wpmu-functions.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index ebecdae..b643eb8 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -290,13 +290,16 @@ function update_site_option( $key, $value ) {
}
function get_blog_option( $id, $key, $default='na' ) {
- global $wpdb, $wpmuBaseTablePrefix, $blog_id;
+ global $wpdb, $wpmuBaseTablePrefix, $blog_id, $switched;
$current_blog_id = $blog_id;
$current_options_table = $wpdb->options;
$wpdb->options = $wpmuBaseTablePrefix . $id . "_options";
$blog_id = $id;
+ if ($id != $current_blog_id)
+ $switched = true;
$opt = get_option( $key );
+ $switched = false;
$blog_id = $current_blog_id;
$wpdb->options = $current_options_table;