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
This commit is contained in:
parent
684cb32ce0
commit
74638831a4
|
@ -48,7 +48,8 @@ case 'addcat':
|
||||||
$cat_name= addslashes(stripslashes(stripslashes($HTTP_POST_VARS['cat_name'])));
|
$cat_name= addslashes(stripslashes(stripslashes($HTTP_POST_VARS['cat_name'])));
|
||||||
$category_nicename = sanitize_title($cat_name);
|
$category_nicename = sanitize_title($cat_name);
|
||||||
$category_description = addslashes(stripslashes(stripslashes($HTTP_POST_VARS['category_description'])));
|
$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')");
|
$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');
|
header('Location: categories.php#addcat');
|
||||||
|
|
Loading…
Reference in New Issue