Forgot stuff for adding new categories. Fixed.
git-svn-id: http://svn.automattic.com/wordpress/trunk@582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9998920f07
commit
e5bcd9d4a0
|
@ -47,8 +47,9 @@ 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'])));
|
||||
|
||||
$wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename) VALUES ('0', '$cat_name', '$category_nicename')");
|
||||
$wpdb->query("INSERT INTO $tablecategories (cat_ID, cat_name, category_nicename, category_description) VALUES ('0', '$cat_name', '$category_nicename', '$category_description')");
|
||||
|
||||
header('Location: categories.php');
|
||||
|
||||
|
@ -161,7 +162,7 @@ default:
|
|||
echo "<tr style='background-color: $bgcolor'><td>$category->cat_name</td>
|
||||
<td>$category->category_description</td>
|
||||
<td>$count</td>
|
||||
<td><a href='categories.php?action=edit&cat_ID=$category->cat_ID' class='edit'>Edit</a></td><td><a href='categories.php?action=Delete&cat_ID=$category->cat_ID' onclick=\"return confirm('You are about to delete the category \'$category->cat_name\' and all its posts will go to the default category.\\n \'OK\' to delete, \'Cancel\' to stop.')\" class='delete'>Delete</a></td>
|
||||
<td><a href='categories.php?action=edit&cat_ID=$category->cat_ID' class='edit'>Edit</a></td><td><a href='categories.php?action=Delete&cat_ID=$category->cat_ID' onclick=\"return confirm('You are about to delete the category \'". addslashes($category->cat_name) ."\' and all its posts will go to the default category.\\n \'OK\' to delete, \'Cancel\' to stop.')\" class='delete'>Delete</a></td>
|
||||
</tr>";
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue