Changeset 25615
- Timestamp:
- 09/24/2013 11:40:41 PM (11 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/capabilities.php
r25438 r25615 96 96 function _init () { 97 97 global $wpdb, $wp_user_roles; 98 $this->role_key = $wpdb-> prefix. 'user_roles';98 $this->role_key = $wpdb->get_blog_prefix() . 'user_roles'; 99 99 if ( ! empty( $wp_user_roles ) ) { 100 100 $this->roles = $wp_user_roles; … … 132 132 133 133 // Duplicated from _init() to avoid an extra function call. 134 $this->role_key = $wpdb-> prefix. 'user_roles';134 $this->role_key = $wpdb->get_blog_prefix() . 'user_roles'; 135 135 $this->roles = get_option( $this->role_key ); 136 136 if ( empty( $this->roles ) ) … … 710 710 711 711 if ( empty($cap_key) ) 712 $this->cap_key = $wpdb-> prefix. 'capabilities';712 $this->cap_key = $wpdb->get_blog_prefix() . 'capabilities'; 713 713 else 714 714 $this->cap_key = $cap_key; … … 860 860 global $wpdb; 861 861 $this->user_level = array_reduce( array_keys( $this->allcaps ), array( $this, 'level_reduction' ), 0 ); 862 update_user_meta( $this->ID, $wpdb-> prefix. 'user_level', $this->user_level );862 update_user_meta( $this->ID, $wpdb->get_blog_prefix() . 'user_level', $this->user_level ); 863 863 } 864 864 … … 902 902 $this->caps = array(); 903 903 delete_user_meta( $this->ID, $this->cap_key ); 904 delete_user_meta( $this->ID, $wpdb-> prefix. 'user_level' );904 delete_user_meta( $this->ID, $wpdb->get_blog_prefix() . 'user_level' ); 905 905 $this->get_role_caps(); 906 906 } -
trunk/src/wp-includes/ms-blogs.php
r25276 r25615 499 499 500 500 $wpdb->set_blog_id( $new_blog ); 501 $GLOBALS['table_prefix'] = $wpdb-> prefix;501 $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix(); 502 502 $prev_blog_id = $GLOBALS['blog_id']; 503 503 $GLOBALS['blog_id'] = $new_blog; … … 562 562 $prev_blog_id = $GLOBALS['blog_id']; 563 563 $GLOBALS['blog_id'] = $blog; 564 $GLOBALS['table_prefix'] = $wpdb-> prefix;564 $GLOBALS['table_prefix'] = $wpdb->get_blog_prefix(); 565 565 566 566 if ( function_exists( 'wp_cache_switch_to_blog' ) ) { -
trunk/src/wp-includes/user.php
r25606 r25615 249 249 return false; 250 250 251 if ( $user->has_prop( $wpdb->prefix . $option ) ) // Blog specific 252 $result = $user->get( $wpdb->prefix . $option ); 251 $prefix = $wpdb->get_blog_prefix(); 252 if ( $user->has_prop( $prefix . $option ) ) // Blog specific 253 $result = $user->get( $prefix . $option ); 253 254 elseif ( $user->has_prop( $option ) ) // User specific and cross-blog 254 255 $result = $user->get( $option ); … … 281 282 282 283 if ( !$global ) 283 $option_name = $wpdb-> prefix. $option_name;284 $option_name = $wpdb->get_blog_prefix() . $option_name; 284 285 285 286 return update_user_meta( $user_id, $option_name, $newvalue ); … … 305 306 306 307 if ( !$global ) 307 $option_name = $wpdb-> prefix. $option_name;308 $option_name = $wpdb->get_blog_prefix() . $option_name; 308 309 return delete_user_meta( $user_id, $option_name ); 309 310 }
Note: See TracChangeset
for help on using the changeset viewer.