Bug fixes and version bump.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt
2004-04-28 08:57:11 +00:00
parent 4e4cb4e004
commit c4bcfc02f1
3 changed files with 44 additions and 9 deletions

View File

@@ -66,7 +66,7 @@ case 'Delete':
$cat_ID = intval($_GET["cat_ID"]);
$cat_name = get_catname($cat_ID);
$cat_name = addslashes($cat_name);
$category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = " . $cat_ID);
$category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = '$cat_ID'");
$cat_parent = $category->category_parent;
if (1 == $cat_ID)
@@ -75,8 +75,8 @@ case 'Delete':
if ($user_level < 3)
die (__('Cheatin&#8217; uh?'));
$wpdb->query("DELETE FROM $tablecategories WHERE cat_ID = $cat_ID");
$wpdb->query("UPDATE $tablecategories SET category_parent=$cat_parent WHERE category_parent=$cat_ID");
$wpdb->query("DELETE FROM $tablecategories WHERE cat_ID = '$cat_ID'");
$wpdb->query("UPDATE $tablecategories SET category_parent = '$cat_parent' WHERE category_parent = '$cat_ID'");
$wpdb->query("UPDATE $tablepost2cat SET category_id='1' WHERE category_id='$cat_ID'");
header('Location: categories.php?message=2');
@@ -86,7 +86,7 @@ break;
case 'edit':
require_once ('admin-header.php');
$category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = " . $_GET['cat_ID']);
$category = $wpdb->get_row("SELECT * FROM $tablecategories WHERE cat_ID = '{$_GET['cat_ID']}'");
$cat_name = stripslashes($category->cat_name);
?>
@@ -127,7 +127,7 @@ case 'editedcat':
$category_nicename = sanitize_title($cat_name);
$category_description = $wpdb->escape(stripslashes($_POST['category_description']));
$wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = $cat WHERE cat_ID = $cat_ID");
$wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = '$cat' WHERE cat_ID = '$cat_ID'");
header('Location: categories.php?message=3');