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:
parent
4e4cb4e004
commit
c4bcfc02f1
|
@ -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');
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
un<?php
|
||||
require_once('../wp-includes/wp-l10n.php');
|
||||
|
||||
$title = __('Posts');
|
||||
|
@ -35,13 +35,48 @@ if ($drafts) {
|
|||
}
|
||||
?>
|
||||
<div class="wrap">
|
||||
<?php
|
||||
if( isset( $_GET['m'] ) )
|
||||
{
|
||||
print "<h3>Showing Posts From ".$month[substr( $_GET['m'], 4, 2 )]." ".substr( $_GET['m'], 0, 4 )."</h3>";
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="viewarc" action="" method="get" style="float: left; width: 20em;">
|
||||
<fieldset>
|
||||
<legend><?php _e('Show Posts From Month of ...') ?></legend>
|
||||
|
||||
<?php
|
||||
echo "<select name=\"m\" style=\"width:120px;\">";
|
||||
$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 "<option ".$default." value=\"".$arc_year.zeroise($arc_month,2)."\">";
|
||||
echo $month[zeroise($arc_month,2)]." $arc_year";
|
||||
echo "</option>\n";
|
||||
}
|
||||
echo "</select>";
|
||||
?>
|
||||
<input type="submit" name="submit" value="<?php _e('Show Month') ?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<form name="searchform" action="" method="get">
|
||||
<fieldset>
|
||||
<legend><?php _e('Show Posts That Contain...') ?></legend>
|
||||
<input type="text" name="s" value="<?php echo $s; ?>" size="17" />
|
||||
<input type="submit" name="submit" value="<?php _e('Search') ?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<br clear="both" />
|
||||
|
||||
<table width="100%" cellpadding="3" cellspacing="3">
|
||||
<tr>
|
||||
<th scope="col"><?php _e('ID') ?></th>
|
||||
|
|
|
@ -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';
|
||||
|
||||
?>
|
Loading…
Reference in New Issue