| 1 | Index: wp-admin/includes/upgrade.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/includes/upgrade.php (revision 10369) |
|---|
| 4 | +++ wp-admin/includes/upgrade.php (working copy) |
|---|
| 5 | @@ -69,8 +69,17 @@ |
|---|
| 6 | |
|---|
| 7 | wp_install_defaults($user_id); |
|---|
| 8 | |
|---|
| 9 | - $wp_rewrite->flush_rules(); |
|---|
| 10 | |
|---|
| 11 | + if ( got_mod_rewrite() && is_file(ABSPATH . '.htaccess') && is_writable(ABSPATH . '.htaccess') ) |
|---|
| 12 | + { |
|---|
| 13 | + $permalink_structure = '/%year%/%monthnum%/%day%/%postname%/'; |
|---|
| 14 | + update_option('permalink_structure', $permalink_structure); |
|---|
| 15 | + } |
|---|
| 16 | + |
|---|
| 17 | + $GLOBALS['wp_rewrite'] =& new WP_Rewrite(); |
|---|
| 18 | + $GLOBALS['wp_rewrite']->flush_rules(); |
|---|
| 19 | + |
|---|
| 20 | + |
|---|
| 21 | wp_new_blog_notification($blog_title, $guessurl, $user_id, $random_password); |
|---|
| 22 | |
|---|
| 23 | wp_cache_flush(); |
|---|