From cf9f85dc8121a359d550ffa3b735fb48859eee88 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 24 Apr 2008 11:45:39 +0000 Subject: Merged with WP 2.5, revision 7806 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1260 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/includes/post.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'wp-admin/includes/post.php') diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 2ee6210..aa1e833 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -74,7 +74,7 @@ function edit_post() { if (!isset( $_POST['ping_status'] )) $_POST['ping_status'] = 'closed'; - foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) { + foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) { if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) { $_POST['edit_date'] = '1'; break; @@ -288,7 +288,7 @@ function wp_write_post() { if (!isset( $_POST['ping_status'] )) $_POST['ping_status'] = 'closed'; - foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) { + foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) { if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) { $_POST['edit_date'] = '1'; break; @@ -506,10 +506,9 @@ function _relocate_children( $old_ID, $new_ID ) { } function get_available_post_statuses($type = 'post') { - global $wpdb; + $stati = wp_count_posts($type); - $stati = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT post_status FROM $wpdb->posts WHERE post_type = %s", $type)); - return $stati; + return array_keys(get_object_vars($stati)); } function wp_edit_posts_query( $q = false ) { -- cgit