Skip to:
Content

BuddyPress.org

Changeset 5336


Ignore:
Timestamp:
11/15/2011 03:06:37 PM (13 years ago)
Author:
boonebgorges
Message:

Look in root blog when pulling up root options en masse in bp_core_get_root_options(). Fixes #3750

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-functions.php

    r5329 r5336  
    10551055    $root_blog_option_keys  = array_keys( $root_blog_options );
    10561056    $blog_options_keys      = "'" . join( "', '", (array) $root_blog_option_keys ) . "'";
    1057     $blog_options_query     = $wpdb->prepare( "SELECT option_name AS name, option_value AS value FROM {$wpdb->options} WHERE option_name IN ( {$blog_options_keys} )" );
     1057    $blog_options_table = bp_is_multiblog_mode() ? $wpdb->options : $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'options';
     1058
     1059    $blog_options_query     = $wpdb->prepare( "SELECT option_name AS name, option_value AS value FROM {$blog_options_table} WHERE option_name IN ( {$blog_options_keys} )" );
    10581060    $root_blog_options_meta = $wpdb->get_results( $blog_options_query );
    10591061
Note: See TracChangeset for help on using the changeset viewer.