From 50dffde71f27e8df18c36b1a33444f92d2278f47 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 3 Apr 2013 04:37:50 +0000 Subject: [PATCH] Replace $user_id removed in [23889] with a direct function call. see #23665. git-svn-id: https://develop.svn.wordpress.org/trunk@23890 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/ajax-actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 0f7a8a083c..b3d558209f 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -1062,7 +1062,7 @@ function wp_ajax_autosave() { if ( ! empty( $_POST['autosave'] ) ) { // Drafts and auto-drafts are just overwritten by autosave for the same user - if ( $user_id == $post->post_author && ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status ) ) { + if ( get_current_user_id() == $post->post_author && ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status ) ) { $id = edit_post(); } else { // Non drafts are not overwritten. The autosave is stored in a special post revision for each user. $revision_id = wp_create_post_autosave( $post->ID );