Make WordPress Core


Ignore:
Timestamp:
02/27/2006 04:57:30 AM (19 years ago)
Author:
ryan
Message:

Bookmark/link rework. #2499

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/list-manipulation.php

    r3566 r3570  
    2323        die ('-1');
    2424
    25     if ( $wpdb->query("DELETE FROM $wpdb->links WHERE link_id = '$id'") )
     25    if ( wp_delete_link($id) )
    2626        die('1');
    2727    else    die('0');
     
    8181    if ( 1 == $id )
    8282        die('0');
    83     if ( !current_user_can('manage_links') )
     83    if ( !current_user_can('manage_categories') )
    8484        die('-1');
    8585
    86     if ( $wpdb->query("DELETE FROM $wpdb->linkcategories WHERE cat_id='$id'") ) {
    87         $wpdb->query("UPDATE $wpdb->links SET link_category=1 WHERE link_category='$id'");
     86    if ( wp_delete_category($id) ) {
    8887        die('1');
    8988    } else {
Note: See TracChangeset for help on using the changeset viewer.