WordPress.org

Make WordPress Core

Ticket #6481: upgrade.diff

File upgrade.diff, 881 bytes (added by mrmist, 5 years ago)

wp-admin\includes\upgrade.php diff

  • wp-admin/includes/upgrade.php

     
    6969 
    7070        wp_install_defaults($user_id); 
    7171 
    72         $wp_rewrite->flush_rules(); 
     72        $permalink_structure = ''; 
     73        $cat_base = ''; 
     74        $tag_base = ''; 
    7375 
     76        if ( got_mod_rewrite() && is_file(ABSPATH . '.htaccess') && is_writable(ABSPATH . '.htaccess') ) 
     77        { 
     78                $permalink_structure = '/%year%/%monthnum%/%day%/%postname%/'; 
     79        } 
     80 
     81        update_option('permalink_structure', $permalink_structure); 
     82        update_option('category_base', $cat_base); 
     83        update_option('tag_base', $tag_base); 
     84 
     85        $GLOBALS['wp_rewrite'] =& new WP_Rewrite(); 
     86        $GLOBALS['wp_rewrite']->flush_rules(); 
     87         
     88 
    7489        wp_new_blog_notification($blog_title, $guessurl, $user_id, $random_password); 
    7590 
    7691        wp_cache_flush();