[wp-cvs] wordpress/wp-includes functions-post.php,1.4,1.5

Ryan Boren rboren at users.sourceforge.net
Sat Sep 4 06:45:00 UTC 2004


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

Modified Files:
	functions-post.php 
Log Message:
Fix for bug 250:  Metaweblog API discards comment_status and ping_status.

Index: functions-post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions-post.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** functions-post.php	25 Aug 2004 15:12:10 -0000	1.4
--- functions-post.php	4 Sep 2004 06:44:58 -0000	1.5
***************
*** 31,38 ****
  	if (empty($post_date_gmt)) 
  		$post_date_gmt = get_gmt_from_date($post_date);
  	
  	$sql = "INSERT INTO $wpdb->posts 
! 		(post_author, post_date, post_date_gmt, post_modified, post_modified_gmt, post_content, post_title, post_excerpt, post_category, post_status, post_name) 
! 		VALUES ('$post_author', '$post_date', '$post_date_gmt', '$post_date', '$post_date_gmt', '$post_content', '$post_title', '$post_excerpt', '$post_cat', '$post_status', '$post_name')";
  	
  	$result = $wpdb->query($sql);
--- 31,42 ----
  	if (empty($post_date_gmt)) 
  		$post_date_gmt = get_gmt_from_date($post_date);
+ 	if (empty($comment_status))
+ 		$comment_status = get_settings('default_comment_status');
+ 	if (empty($ping_status))
+ 		$ping_status = get_settings('default_ping_status');
  	
  	$sql = "INSERT INTO $wpdb->posts 
! 		(post_author, post_date, post_date_gmt, post_modified, post_modified_gmt, post_content, post_title, post_excerpt, post_category, post_status, post_name, comment_status, ping_status) 
! 		VALUES ('$post_author', '$post_date', '$post_date_gmt', '$post_date', '$post_date_gmt', '$post_content', '$post_title', '$post_excerpt', '$post_cat', '$post_status', '$post_name', '$comment_status', '$ping_status')";
  	
  	$result = $wpdb->query($sql);




More information about the cvs mailing list