[wp-cvs] wordpress xmlrpc.php,1.25,1.26

Michel Valdrighi michelvaldrighi at users.sourceforge.net
Wed Sep 22 19:45:31 UTC 2004


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

Modified Files:
	xmlrpc.php 
Log Message:
make pingback.ping use wp_new_comment

Index: xmlrpc.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/xmlrpc.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** xmlrpc.php	22 Sep 2004 12:11:05 -0000	1.25
--- xmlrpc.php	22 Sep 2004 19:45:29 -0000	1.26
***************
*** 1238,1245 ****
  		$original_title = $title;
  		$title = addslashes(strip_tags(trim($title)));
- 		$user_ip = $_SERVER['REMOTE_ADDR'];
- 		$user_agent = addslashes($_SERVER['HTTP_USER_AGENT']);
- 		$now = current_time('mysql');
- 		$now_gmt = current_time('mysql', 1);
  
  		// Check if the entry allows pings
--- 1238,1241 ----
***************
*** 1249,1259 ****
  
  
! 		$consulta = $wpdb->query("INSERT INTO $wpdb->comments 
! 			(comment_post_ID, comment_author, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved, comment_agent, comment_type) 
! 			VALUES 
! 			($post_ID, '$title', '$pagelinkedfrom', '$user_ip', '$now', '$now_gmt', '$context', '1', '$user_agent', 'pingback')
! 		");
  
! 		$comment_ID = $wpdb->get_var('SELECT last_insert_id()');
  
  		if (get_settings('comments_notify')) {
--- 1245,1257 ----
  
  
! 		$comment_post_ID = $post_ID;
! 		$comment_author = $title;
! 		$comment_author_url = $pagelinkedfrom;
! 		$comment_content = $context;
! 		$comment_type = 'pingback';
  
! 		$commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_content', 'comment_type');
! 
! 		$comment_ID = $wpdb->insert_id;
  
  		if (get_settings('comments_notify')) {




More information about the cvs mailing list