From 6add46af145dde6e70e177f15e740ab37a6e2d28 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 14 Feb 2006 23:22:22 +0000 Subject: [PATCH] Give future posts a post_status of future when upgrading. git-svn-id: https://develop.svn.wordpress.org/trunk@3531 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/upgrade-functions.php | 6 ++++++ wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/wp-admin/upgrade-functions.php b/wp-admin/upgrade-functions.php index 4a99e0831c..24f863c24c 100644 --- a/wp-admin/upgrade-functions.php +++ b/wp-admin/upgrade-functions.php @@ -355,6 +355,12 @@ function upgrade_210() { if ( $wp_current_db_version < 3513 ) { populate_roles_210(); } + + if ( $wp_current_db_version < 3531 ) { + // Give future posts a post_status of future. + $now = gmdate('Y-m-d H:i:59'); + $posts = $wpdb->query ("UPDATE $wpdb->posts SET post_status = 'future' WHERE post_status = 'publish' and post_date_gmt < '$now'"); + } } // The functions we use to actually do stuff diff --git a/wp-includes/version.php b/wp-includes/version.php index 857bef85ad..2936135e13 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -3,6 +3,6 @@ // This just holds the version number, in a separate file so we can bump it without cluttering the SVN $wp_version = '2.1-alpha1'; -$wp_db_version = 3514; +$wp_db_version = 3531; ?> \ No newline at end of file