Changeset 5026
- Timestamp:
- 08/22/2011 07:42:53 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-functions.php
r5024 r5026 944 944 $root_blog_options = apply_filters( 'bp_core_site_options', array( 945 945 946 // BuddyPress core settings947 'bp-deactivated-components' => serialize( array( ) ),948 'bp-blogs-first-install' => '0',949 'bp-disable-blog-forum-comments' => '0',950 'bp-xprofile-base-group-name' => 'Base',951 'bp-xprofile-fullname-field-name' => 'Name',952 'bp-disable-profile-sync' => '0',953 'bp-disable-avatar-uploads' => '0',954 'bp-disable-account-deletion' => '0',955 'bp-disable-blogforum-comments' => '0',956 'bb-config-location' => ABSPATH,957 'hide-loggedout-adminbar' => '0',958 959 // Useful WordPress settings960 'registration' => '0',961 'avatar_default' => 'mysteryman'946 // BuddyPress core settings 947 'bp-deactivated-components' => serialize( array( ) ), 948 'bp-blogs-first-install' => '0', 949 'bp-disable-blog-forum-comments' => '0', 950 'bp-xprofile-base-group-name' => 'Base', 951 'bp-xprofile-fullname-field-name' => 'Name', 952 'bp-disable-profile-sync' => '0', 953 'bp-disable-avatar-uploads' => '0', 954 'bp-disable-account-deletion' => '0', 955 'bp-disable-blogforum-comments' => '0', 956 'bb-config-location' => ABSPATH, 957 'hide-loggedout-adminbar' => '0', 958 959 // Useful WordPress settings 960 'registration' => '0', 961 'avatar_default' => 'mysteryman' 962 962 ) ); 963 963 964 964 $root_blog_option_keys = array_keys( $root_blog_options ); 965 $blog_options_keys = implode( "', '", (array) $root_blog_option_keys );966 $blog_options_query = sprintf( "SELECT option_name AS name, option_value AS value FROM {$wpdb->options} WHERE option_name IN ('%s')", $blog_options_keys);965 $blog_options_keys = "'" . join( "', '", (array) $root_blog_option_keys ) . "'"; 966 $blog_options_query = $wpdb->prepare( "SELECT option_name AS name, option_value AS value FROM {$wpdb->options} WHERE option_name IN ( {$blog_options_keys} )" ); 967 967 $root_blog_options_meta = $wpdb->get_results( $blog_options_query ); 968 968 … … 975 975 ) ); 976 976 977 $current_site = get_current_site(); 977 978 $network_option_keys = array_keys( $network_options ); 978 $sitemeta_options_keys = implode( "','", (array) $network_option_keys ); 979 $current_site = get_current_site(); 980 $sitemeta_options_query = sprintf( "SELECT meta_key AS name, meta_value AS value FROM {$wpdb->sitemeta} WHERE meta_key IN ('%s') AND site_id = %d", $sitemeta_options_keys, $current_site->id ); 979 $sitemeta_options_keys = "'" . join( "', '", (array) $network_option_keys ) . "'"; 980 $sitemeta_options_query = $wpdb->prepare( "SELECT meta_key AS name, meta_value AS value FROM {$wpdb->sitemeta} WHERE meta_key IN ( {$sitemeta_options_keys} ) AND site_id = %d", $current_site->id ); 981 981 $network_options_meta = $wpdb->get_results( $sitemeta_options_query ); 982 982
Note: See TracChangeset
for help on using the changeset viewer.