Changeset 1706

Show
Ignore:
Timestamp:
09/22/04 19:45:29 (4 years ago)
Author:
michelvaldrighi
Message:

make pingback.ping use wp_new_comment

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/xmlrpc.php

    r1704 r1706  
    12381238        $original_title = $title; 
    12391239        $title = addslashes(strip_tags(trim($title))); 
    1240         $user_ip = $_SERVER['REMOTE_ADDR']; 
    1241         $user_agent = addslashes($_SERVER['HTTP_USER_AGENT']); 
    1242         $now = current_time('mysql'); 
    1243         $now_gmt = current_time('mysql', 1); 
    12441240 
    12451241        // Check if the entry allows pings 
     
    12491245 
    12501246 
    1251         $consulta = $wpdb->query("INSERT INTO $wpdb->comments  
    1252             (comment_post_ID, comment_author, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved, comment_agent, comment_type)  
    1253             VALUES  
    1254             ($post_ID, '$title', '$pagelinkedfrom', '$user_ip', '$now', '$now_gmt', '$context', '1', '$user_agent', 'pingback') 
    1255         "); 
    1256  
    1257         $comment_ID = $wpdb->get_var('SELECT last_insert_id()'); 
     1247        $comment_post_ID = $post_ID; 
     1248        $comment_author = $title; 
     1249        $comment_author_url = $pagelinkedfrom; 
     1250        $comment_content = $context; 
     1251        $comment_type = 'pingback'; 
     1252 
     1253        $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_content', 'comment_type'); 
     1254 
     1255        $comment_ID = $wpdb->insert_id; 
    12581256 
    12591257        if (get_settings('comments_notify')) {