Preserve author ID when editing pages. Bug 480. Hat tip: adsworth
git-svn-id: http://svn.automattic.com/wordpress/trunk@1873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
368bf570e6
commit
c84728b1f3
|
@ -235,7 +235,11 @@ case 'editpost':
|
||||||
$post_title = $_POST['post_title'];
|
$post_title = $_POST['post_title'];
|
||||||
$prev_status = $_POST['prev_status'];
|
$prev_status = $_POST['prev_status'];
|
||||||
$post_status = $_POST['post_status'];
|
$post_status = $_POST['post_status'];
|
||||||
$post_author = (int) $_POST['post_author'];
|
if (! empty($_POST['post_author'])) {
|
||||||
|
$post_author = (int) $_POST['post_author'];
|
||||||
|
} else {
|
||||||
|
$post_author = (int) $_POST['user_ID'];
|
||||||
|
}
|
||||||
if ( !user_can_edit_user($user_ID, $post_author) )
|
if ( !user_can_edit_user($user_ID, $post_author) )
|
||||||
die( __('You cannot post as this user.') );
|
die( __('You cannot post as this user.') );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue