Make WordPress Core

Changeset 1964 for trunk/xmlrpc.php


Ignore:
Timestamp:
12/16/2004 02:57:05 AM (20 years ago)
Author:
saxmatt
Message:

Comments refactoring and cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r1942 r1964  
    12191219        $pagelinkedfrom = addslashes($pagelinkedfrom);
    12201220        $original_title = $title;
    1221         $title = addslashes(strip_tags(trim($title)));
    1222 
    1223         // Check if the entry allows pings
    1224         if( !check_comment($title, '', $pagelinkedfrom, $context, $user_ip, $user_agent) ) {
    1225             return new IXR_Error(49, 'Pingbacks not allowed on this entry.');
    1226         }
     1221
     1222        $pingstatus = $wpdb->get_var("SELECT ping_status FROM $wpdb->posts WHERE ID = $tb_id");
     1223   
     1224        if ('open' != $pingstatus)
     1225            trackback_response(1, 'Sorry, trackbacks are closed for this item.');
    12271226
    12281227        $comment_post_ID = $post_ID;
     
    12351234
    12361235        wp_new_comment($commentdata);
    1237 
    1238         $comment_ID = $wpdb->insert_id;
    1239 
    1240         do_action('pingback_post', $comment_ID);
     1236        do_action('pingback_post', $wpdb->insert_id);
    12411237       
    12421238        return "Pingback from $pagelinkedfrom to $pagelinkedto registered. Keep the web talking! :-)";
Note: See TracChangeset for help on using the changeset viewer.