Changeset 13329
- Timestamp:
- 02/23/2010 10:42:40 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ms.php
r13311 r13329 544 544 if ( !empty( $blogs ) ) { 545 545 foreach( $blogs as $blogid => $blog ) { 546 if ( $blogid != $dashboard_blog->blog_id && get_user_meta( $current_user->ID , 'primary_blog' ) == $dashboard_blog->blog_id ) {546 if ( $blogid != $dashboard_blog->blog_id && get_user_meta( $current_user->ID , 'primary_blog', true ) == $dashboard_blog->blog_id ) { 547 547 update_user_meta( $current_user->ID, 'primary_blog', $blogid ); 548 548 continue; 549 549 } 550 550 } 551 $blog = get_blog_details( get_user_meta( $current_user->ID , 'primary_blog') );551 $blog = get_blog_details( get_user_meta( $current_user->ID, 'primary_blog', true ) ); 552 552 $protocol = ( is_ssl() ? 'https://' : 'http://' ); 553 553 wp_redirect( $protocol . $blog->domain . $blog->path . 'wp-admin/?c=' . $c ); // redirect and count to 5, "just in case" … … 691 691 <?php 692 692 $all_blogs = get_blogs_of_user( $current_user->ID ); 693 $primary_blog = get_user_meta($current_user->ID, 'primary_blog' );693 $primary_blog = get_user_meta($current_user->ID, 'primary_blog', true); 694 694 if ( count( $all_blogs ) > 1 ) { 695 695 $found = false; -
trunk/wp-admin/includes/upgrade.php
r13311 r13329 705 705 $caps = get_user_meta( $user->ID, $wpdb->prefix . 'capabilities'); 706 706 if ( empty($caps) || defined('RESET_CAPS') ) { 707 $level = get_user_meta($user->ID, $wpdb->prefix . 'user_level' );707 $level = get_user_meta($user->ID, $wpdb->prefix . 'user_level', true); 708 708 $role = translate_level_to_role($level); 709 709 update_user_meta( $user->ID, $wpdb->prefix . 'capabilities', array($role => true) ); -
trunk/wp-includes/ms-functions.php
r13311 r13329 83 83 } 84 84 85 $primary_blog = get_user_meta( $user_id, "primary_blog");85 $primary_blog = get_user_meta( $user_id, 'primary_blog', true ); 86 86 $details = get_dashboard_blog(); 87 87 if ( $primary_blog ) { … … 110 110 $ret = $blog; 111 111 $changed = false; 112 if ( get_user_meta( $user_id , 'primary_blog' ) != $blog_id ) {112 if ( get_user_meta( $user_id , 'primary_blog', true ) != $blog_id ) { 113 113 update_user_meta( $user_id, 'primary_blog', $blog_id ); 114 114 $changed = true; 115 115 } 116 if ( !get_user_meta($user_id , 'source_domain' ) ) {116 if ( !get_user_meta($user_id , 'source_domain', true) ) { 117 117 update_user_meta( $user_id, 'source_domain', $blog->domain ); 118 118 $changed = true; … … 249 249 return new WP_Error('user_does_not_exist', __('That user does not exist.')); 250 250 251 if ( !get_user_meta($user_id, 'primary_blog' ) ) {251 if ( !get_user_meta($user_id, 'primary_blog', true) ) { 252 252 update_user_meta($user_id, 'primary_blog', $blog_id); 253 253 $details = get_blog_details($blog_id); … … 271 271 // If being removed from the primary blog, set a new primary if the user is assigned 272 272 // to multiple blogs. 273 $primary_blog = get_user_meta($user_id, 'primary_blog' );273 $primary_blog = get_user_meta($user_id, 'primary_blog', true); 274 274 if ( $primary_blog == $blog_id ) { 275 275 $new_id = ''; … … 827 827 update_option( 'blog_public', $meta['public'] ); 828 828 829 if ( !is_super_admin() && get_user_meta( $user_id, 'primary_blog' ) == get_site_option( 'dashboard_blog', 1 ) )829 if ( !is_super_admin() && get_user_meta( $user_id, 'primary_blog', true ) == get_site_option( 'dashboard_blog', 1 ) ) 830 830 update_user_meta( $user_id, 'primary_blog', $blog_id ); 831 831
Note: See TracChangeset
for help on using the changeset viewer.