WordPress.org

Make WordPress Core

Ticket #6481: upgrade_v2.diff

File upgrade_v2.diff, 730 bytes (added by mrmist, 11 years ago)

Alternate version of patch with DD32's comments in mind

  • wp-admin/includes/upgrade.php

     
    6969
    7070        wp_install_defaults($user_id);
    7171
    72         $wp_rewrite->flush_rules();
    7372
     73        if ( got_mod_rewrite() && is_file(ABSPATH . '.htaccess') && is_writable(ABSPATH . '.htaccess') )
     74        {
     75                $permalink_structure = '/%year%/%monthnum%/%day%/%postname%/';
     76                update_option('permalink_structure', $permalink_structure);
     77        }
     78
     79        $GLOBALS['wp_rewrite'] =& new WP_Rewrite();
     80        $GLOBALS['wp_rewrite']->flush_rules();
     81       
     82
    7483        wp_new_blog_notification($blog_title, $guessurl, $user_id, $random_password);
    7584
    7685        wp_cache_flush();