Bug fixes and version bump.

git-svn-id: https://develop.svn.wordpress.org/trunk@1204 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2004-04-28 08:57:11 +00:00
parent 20cb408553
commit b8e5917c5d
3 changed files with 44 additions and 9 deletions
+5 -5
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');