Ticket #22178: 22178.3.diff
File 22178.3.diff, 2.2 KB (added by , 12 years ago) |
---|
-
wp-includes/option.php
540 540 if ( ! $user = wp_get_current_user() ) 541 541 return; 542 542 543 if ( is_super_admin( $user->ID ) && 544 ! in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user->ID ) ) ) 545 ) 546 return; 547 543 548 $settings = get_user_option( 'user-settings', $user->ID ); 544 549 545 550 if ( isset( $_COOKIE['wp-settings-' . $user->ID] ) ) { … … 697 702 if ( ! $user = wp_get_current_user() ) 698 703 return false; 699 704 705 if ( is_super_admin( $user->ID ) && 706 ! in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user->ID ) ) ) 707 ) 708 return; 709 700 710 $_updated_user_settings = $all; 701 711 $settings = ''; 702 712 foreach ( $all as $k => $v ) { -
wp-admin/includes/dashboard.php
490 490 $post = get_post( $last_post_id ); 491 491 if ( empty( $post ) || $post->post_status != 'auto-draft' ) { // auto-draft doesn't exists anymore 492 492 $post = get_default_post_to_edit('post', true); 493 update_user_option( (int) $GLOBALS['current_user']->ID, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID493 update_user_option( get_current_user_id(), 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID 494 494 } else { 495 495 $post->post_title = ''; // Remove the auto draft title 496 496 } 497 497 } else { 498 $post = get_default_post_to_edit('post', true); 499 update_user_option( (int) $GLOBALS['current_user']->ID, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID 498 $post = get_default_post_to_edit( 'post' , true); 499 $user_id = get_current_user_id(); 500 // Don't create an option if this is a super admin who does not belong to this site. 501 if ( ! ( is_super_admin( $user_id ) && ! in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user_id ) ) ) ) ) 502 update_user_option( $user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID 500 503 } 501 504 502 505 $post_ID = (int) $post->ID;