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
This commit is contained in:
Ryan Boren 2006-02-14 23:22:22 +00:00
parent 14e0e16c39
commit 6add46af14
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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;
?>