WordPress.org

Make WordPress Core

Changeset 8921


Ignore:
Timestamp:
09/17/08 21:47:27 (6 years ago)
Author:
ryan
Message:

Update post_date for old drafts during upgrade. see #5698

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r8763 r8921  
    211211        upgrade_260(); 
    212212 
    213     if ( $wp_current_db_version < 8539 ) 
     213    if ( $wp_current_db_version < 8921 ) 
    214214        upgrade_270(); 
    215215 
     
    753753 
    754754function upgrade_260() { 
     755    global $wp_current_db_version; 
     756 
    755757    if ( $wp_current_db_version < 8000 ) 
    756758        populate_roles_260(); 
     
    763765 
    764766function upgrade_270() { 
     767    global $wpdb, $wp_current_db_version; 
     768 
    765769    if ( $wp_current_db_version < 8530 ) 
    766770        populate_roles_270(); 
     771 
     772    // Update post_date for unpublished posts with empty timestamp 
     773    if ( $wp_current_db_version < 8921 ) 
     774        $wpdb->query( "UPDATE $wpdb->posts SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'" ); 
    767775} 
    768776 
  • trunk/wp-includes/version.php

    r8892 r8921  
    1616 * @global int $wp_db_version 
    1717 */ 
    18 $wp_db_version = 8890; 
     18$wp_db_version = 8921; 
    1919 
    2020?> 
Note: See TracChangeset for help on using the changeset viewer.