Post edit collision detection fixes from mdawaffe. fixes #6043

git-svn-id: https://develop.svn.wordpress.org/trunk@7146 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-03-04 00:05:30 +00:00
parent 742b6b7ceb
commit 9df4b3f641
8 changed files with 17 additions and 7 deletions

View File

@@ -69,7 +69,7 @@ case 'edit':
if ( $last = wp_check_post_lock( $post->ID ) ) {
$last_user = get_userdata( $last );
$last_user_name = $last_user ? $last_user->display_name : __('Somebody');
$message = sprintf( __( '%s is currently editing this post' ), wp_specialchars( $last_user_name ) );
$message = sprintf( __( 'Warning: %s is currently editing this post' ), wp_specialchars( $last_user_name ) );
$message = str_replace( "'", "\'", "<div class='error'><p>$message</p></div>" );
add_action('admin_notices', create_function( '', "echo '$message';" ) );
} else {