Changeset 5586

Show
Ignore:
Timestamp:
05/29/07 04:26:36 (1 year ago)
Author:
ryan
Message:

Use API instead of SELECT. see #4189

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/post.php

    r5556 r5586  
    13661366    $file = get_attached_file( $postid ); 
    13671367 
     1368    // TODO delete for pluggable post taxonomies too 
     1369    wp_delete_object_term_relationships($postid, array('category', 'post_tag')); 
     1370 
    13681371    $wpdb->query("DELETE FROM $wpdb->posts WHERE ID = '$postid'"); 
    13691372 
    13701373    $wpdb->query("DELETE FROM $wpdb->comments WHERE comment_post_ID = '$postid'"); 
    1371  
    1372     $wpdb->query("DELETE FROM $wpdb->post2cat WHERE post_id = '$postid'"); 
    13731374 
    13741375    $wpdb->query("DELETE FROM $wpdb->postmeta WHERE post_id = '$postid'");