From 74638831a4e6776dd172ca639eb32eb42789a411 Mon Sep 17 00:00:00 2001 From: emc3 Date: Wed, 10 Mar 2004 19:46:48 +0000 Subject: [PATCH] Need to explicitly set the $cat var, in case globals are turned off. git-svn-id: http://svn.automattic.com/wordpress/trunk@968 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/categories.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 68857cf88..514599592 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -48,7 +48,8 @@ case 'addcat': $cat_name= addslashes(stripslashes(stripslashes($HTTP_POST_VARS['cat_name']))); $category_nicename = sanitize_title($cat_name); $category_description = addslashes(stripslashes(stripslashes($HTTP_POST_VARS['category_description']))); - + $cat = intval($HTTP_POST_VARS['cat']); + $wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description, category_parent) VALUES ('0', '$cat_name', '$category_nicename', '$category_description', '$cat')"); header('Location: categories.php#addcat');