[wp-cvs] wordpress/wp-admin post.php,1.109,1.110
Ryan Boren
rboren at users.sourceforge.net
Sun Nov 21 21:28:20 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14503
Modified Files:
post.php
Log Message:
Preserve author ID when editing pages. Bug 480. Hat tip: adsworth
Index: post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/post.php,v
retrieving revision 1.109
retrieving revision 1.110
diff -C2 -d -r1.109 -r1.110
*** post.php 18 Nov 2004 19:40:35 -0000 1.109
--- post.php 21 Nov 2004 21:28:18 -0000 1.110
***************
*** 236,240 ****
$prev_status = $_POST['prev_status'];
$post_status = $_POST['post_status'];
! $post_author = (int) $_POST['post_author'];
if ( !user_can_edit_user($user_ID, $post_author) )
die( __('You cannot post as this user.') );
--- 236,244 ----
$prev_status = $_POST['prev_status'];
$post_status = $_POST['post_status'];
! 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) )
die( __('You cannot post as this user.') );
More information about the cvs
mailing list