From c4bcfc02f1005adc8b196dac6caabd3cbc58700e Mon Sep 17 00:00:00 2001 From: saxmatt Date: Wed, 28 Apr 2004 08:57:11 +0000 Subject: [PATCH] Bug fixes and version bump. git-svn-id: http://svn.automattic.com/wordpress/trunk@1204 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/categories.php | 10 +++++----- wp-admin/edit.php | 41 ++++++++++++++++++++++++++++++++++++++--- wp-includes/version.php | 2 +- 3 files changed, 44 insertions(+), 9 deletions(-) diff --git a/wp-admin/categories.php b/wp-admin/categories.php index c06333dcf2..de025126f3 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -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’ 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'); diff --git a/wp-admin/edit.php b/wp-admin/edit.php index c16d7331ab..90f3ac6498 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -1,4 +1,4 @@ -
+Showing Posts From ".$month[substr( $_GET['m'], 4, 2 )]." ".substr( $_GET['m'], 0, 4 ).""; +} +?> + +
+
+ + + "; + $arc_result=$wpdb->get_results("SELECT DISTINCT YEAR(post_date), MONTH(post_date) FROM $tableposts ORDER BY post_date DESC",ARRAY_A); + foreach ($arc_result as $arc_row) { + $arc_year = $arc_row["YEAR(post_date)"]; + $arc_month = $arc_row["MONTH(post_date)"]; + + if( $arc_year.zeroise($arc_month,2) == $_GET['m'] ) + $default = "selected"; + else + $default = null; + + echo "\n"; + } + echo ""; + ?> + +
+
-
-
+ + + +
+ diff --git a/wp-includes/version.php b/wp-includes/version.php index 55c56f3b20..9d0ba8ab91 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -2,6 +2,6 @@ // This just holds the version number, in a separate file so we can bump it without cluttering the CVS -$wp_version = '1.2-alpha-11'; +$wp_version = '1.2-alpha-15'; ?> \ No newline at end of file