Ticket #23697: 23697-3.patch
File 23697-3.patch, 3.4 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/class-wp-posts-list-table.php
477 477 $classes = $alternate . ' iedit author-' . ( get_current_user_id() == $post->post_author ? 'self' : 'other' ); 478 478 479 479 $lock_holder = wp_check_post_lock( $post->ID ); 480 // Don't show the "[superadmin] is currently editing" in the list table 481 // when a superadmin that is not a member of this blog has locked the post 482 if ( $lock_holder && is_multisite() && is_super_admin( $lock_holder ) && ! is_user_member_of_blog( $lock_holder ) ) 483 $lock_holder = false; 484 480 485 if ( $lock_holder ) { 481 486 $classes .= ' wp-locked'; 482 487 $lock_holder = get_userdata( $lock_holder ); -
wp-admin/includes/misc.php
608 608 if ( !current_user_can('edit_post', $post_id) ) 609 609 return $response; 610 610 611 // No locks for superadmins that are not users on this blog 612 if ( is_multisite() && is_super_admin() && ! is_user_member_of_blog() ) 613 return $response; 614 611 615 if ( $user_id = wp_check_post_lock( $post_id ) ) { 616 // Don't show the "[superadmin] has taken over..." dialog to users 617 // when a superadmin that is not a member of this blog has locked the post 618 if ( is_multisite() && is_super_admin( $user_id ) && ! is_user_member_of_blog( $user_id ) ) 619 return $response; 620 612 621 $user = get_userdata( $user_id ); 613 622 614 623 $error = array( -
wp-admin/includes/post.php
1190 1190 if ( ! $post = get_post() ) 1191 1191 return; 1192 1192 1193 if ( $user = wp_check_post_lock( $post->ID ) ) { 1194 $user = get_userdata( $user ); 1195 $locked = apply_filters( 'show_post_locked_dialog', true, $post, $user ); 1193 // Don't show "locked" dialogs to superadmins that are not users on this blog 1194 if ( is_multisite() && is_super_admin() && ! is_user_member_of_blog() ) 1195 return; 1196 1197 if ( $user_id = wp_check_post_lock( $post->ID ) ) { 1198 // Don't show the "Content locked..." dialog to users 1199 // when a superadmin that is not a member of this blog has locked the post 1200 if ( is_multisite() && is_super_admin( $user_id ) && ! is_user_member_of_blog( $user_id ) ) 1201 $locked = false; 1202 else 1203 $locked = true; 1204 1205 $user = get_userdata( $user_id ); 1206 $locked = apply_filters( 'show_post_locked_dialog', $locked, $post, $user ); 1196 1207 } else { 1197 1208 $locked = false; 1198 1209 } -
wp-admin/js/post.js
276 276 // show "editing taken over" message 277 277 wrap = $('#notification-dialog-wrap'); 278 278 279 if ( ! wrap.is(':visible') ) { 280 autosave(); 279 if ( wrap.length && ! wrap.is(':visible') ) { 280 if ( typeof autosave == 'function' ) 281 autosave(); 281 282 282 283 if ( received.lock_error.avatar_src ) { 283 284 avatar = $('<img class="avatar avatar-64 photo" width="64" height="64" />').attr( 'src', received.lock_error.avatar_src.replace(/&/g, '&') );