From 3bf8b1699a2217c1be778afb600114cac66d37d2 Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 31 Mar 2007 22:38:51 +0000 Subject: [PATCH] Use category_exists instead of a direct query. git-svn-id: http://svn.automattic.com/wordpress/trunk@5162 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/admin-db.php b/wp-admin/admin-db.php index 922be32666..bbd28ba3d9 100644 --- a/wp-admin/admin-db.php +++ b/wp-admin/admin-db.php @@ -122,7 +122,7 @@ function wp_insert_category($catarr) { $links_private = 0; // Let's check if we have this category already, if so just do an update - if ( $cat_ID = $wpdb->get_var( "SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename' " ) ) + if ( $cat_ID = category_exists( $category_nicename ) ) $update = true; if (!$update) {