[wp-cvs] wordpress/wp-admin post.php,1.122,1.123

Matthew Mullenweg saxmatt at users.sourceforge.net
Mon Jan 31 10:32:31 GMT 2005


Update of /cvsroot/cafelog/wordpress/wp-admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29854/wp-admin

Modified Files:
	post.php 
Log Message:
Fix for assigning authors - http://mosquito.wordpress.org/view.php?id=759

Index: post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-admin/post.php,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -d -r1.122 -r1.123
*** post.php	31 Jan 2005 04:22:00 -0000	1.122
--- post.php	31 Jan 2005 10:32:28 -0000	1.123
***************
*** 45,48 ****
--- 45,58 ----
  		$menu_order = $_POST['menu_order'];
  
+ 	if (! empty($_POST['post_author_override'])) {
+ 		$post_author = (int) $_POST['post_author_override'];
+ 	} else 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.') );
+ 
  	if ( empty($post_status) )
  		$post_status = 'draft';
***************
*** 98,102 ****
  			(ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt,  post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt, post_parent, menu_order)
  			VALUES
! 			('$post_ID', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt', '$post_parent', '$menu_order')
  			";
  
--- 108,112 ----
  			(ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt,  post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt, post_parent, menu_order)
  			VALUES
! 			('$post_ID', '$post_author', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt', '$post_parent', '$menu_order')
  			";
  



More information about the cvs mailing list