Category parent fix from donncha. fixes #1775

git-svn-id: http://svn.automattic.com/wordpress/trunk@2959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-10-20 20:50:31 +00:00
parent 45fc6c1664
commit 54d4d7fcf1
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ function wp_insert_category($catarr) {
$category_parent = 0;
if (!$update) {
$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')");
$wpdb->query("INSERT INTO $wpdb->categories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$category_parent')");
$cat_ID = $wpdb->insert_id;
} else {
$wpdb->query ("UPDATE $wpdb->categories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = '$category_parent' WHERE cat_ID = '$cat_ID'");