WordPress.org

Make WordPress Core

Changeset 5162


Ignore:
Timestamp:
03/31/07 22:38:51 (7 years ago)
Author:
matt
Message:

Use category_exists instead of a direct query.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-db.php

    r5157 r5162  
    123123 
    124124    // Let's check if we have this category already, if so just do an update 
    125     if ( $cat_ID = $wpdb->get_var( "SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename' " ) ) 
     125    if ( $cat_ID = category_exists( $category_nicename ) ) 
    126126        $update = true; 
    127127 
Note: See TracChangeset for help on using the changeset viewer.