[wp-cvs] wordpress/wp-includes functions-post.php,1.6,1.7

Matthew Mullenweg saxmatt at users.sourceforge.net
Sun Sep 5 02:03:53 UTC 2004


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

Modified Files:
	functions-post.php 
Log Message:
Set GUID when posting.

Index: functions-post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions-post.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** functions-post.php	5 Sep 2004 00:24:28 -0000	1.6
--- functions-post.php	5 Sep 2004 02:03:50 -0000	1.7
***************
*** 42,47 ****
  	$result = $wpdb->query($sql);
  	$post_ID = $wpdb->insert_id;
  	
! 	wp_set_post_cats('',$post_ID,$post_category);
  	
  	if ($post_status == 'publish') {
--- 42,50 ----
  	$result = $wpdb->query($sql);
  	$post_ID = $wpdb->insert_id;
+ 
+ 	// Set GUID
+ 	$wpdb->query("UPDATE $wpdb->posts SET guid = '" . get_permalink($post_ID) . "' WHERE ID = '$post_ID'");
  	
! 	wp_set_post_cats('', $post_ID, $post_category);
  	
  	if ($post_status == 'publish') {
***************
*** 49,52 ****
--- 52,57 ----
  	}
  
+ 	pingback($content, $post_ID);
+ 
  	// Return insert_id if we got a good result, otherwise return zero.
  	return $result ? $post_ID : 0;




More information about the cvs mailing list