Changeset 3373
- Timestamp:
- 12/28/2005 07:05:05 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/install.php
r3285 r3373 172 172 173 173 $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, post_status, to_ping, pinged, post_content_filtered) VALUES ('1', '$now', '$now_gmt', '".$wpdb->escape(__('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'))."', '', '".$wpdb->escape(__('About'))."', '0', '".$wpdb->escape(__('about'))."', '$now', '$now_gmt', 'static', '', '', '')"); 174 generate_page_rewrite_rules();174 $wp_rewrite->flush_rules(); 175 175 176 176 // Set up admin user -
trunk/wp-admin/options-permalink.php
r3294 r3373 77 77 $category_base = get_settings('category_base'); 78 78 79 generate_page_rewrite_rules();80 81 79 if ( (!file_exists($home_path.'.htaccess') && is_writable($home_path)) || is_writable($home_path.'.htaccess') ) 82 80 $writable = true; … … 89 87 $usingpi = false; 90 88 91 save_mod_rewrite_rules();89 $wp_rewrite->flush_rules(); 92 90 ?> 93 91 -
trunk/wp-admin/options.php
r3241 r3373 67 67 if ( get_settings('siteurl') != $old_siteurl || get_settings('home') != $old_home ) { 68 68 // If home changed, write rewrite rules to new location. 69 save_mod_rewrite_rules();69 $wp_rewrite->flush_rules(); 70 70 // Get currently logged in user and password. 71 71 get_currentuserinfo(); -
trunk/wp-admin/upgrade-functions.php
r3372 r3373 5 5 // Functions to be called in install and upgrade scripts 6 6 function upgrade_all() { 7 global $wp_current_db_version, $wp_db_version ;7 global $wp_current_db_version, $wp_db_version, $wp_rewrite; 8 8 $wp_current_db_version = __get_option('db_version'); 9 9 … … 34 34 upgrade_160(); 35 35 36 generate_page_rewrite_rules(); 37 save_mod_rewrite_rules(); 36 $wp_rewrite->flush_rules(); 38 37 39 38 update_option('db_version', $wp_db_version); -
trunk/wp-includes/classes.php
r3371 r3373 1340 1340 1341 1341 function wp_rewrite_rules() { 1342 $this->matches = 'matches'; 1343 return $this->rewrite_rules(); 1342 $this->rules = get_option('rewrite_rules'); 1343 if ( empty($this->rules) ) { 1344 $this->matches = 'matches'; 1345 $this->rewrite_rules(); 1346 update_option('rewrite_rules', $this->rules); 1347 } 1348 1349 return $this->rules; 1344 1350 } 1345 1351 … … 1395 1401 1396 1402 return $rules; 1403 } 1404 1405 function flush_rules() { 1406 generate_page_rewrite_rules(); 1407 delete_option('rewrite_rules'); 1408 $this->wp_rewrite_rules(); 1409 if ( function_exists('save_mod_rewrite_rules') ) 1410 save_mod_rewrite_rules(); 1397 1411 } 1398 1412 -
trunk/wp-includes/functions-post.php
r3371 r3373 7 7 */ 8 8 function wp_insert_post($postarr = array()) { 9 global $wpdb, $ allowedtags, $user_ID;9 global $wpdb, $wp_rewrite, $allowedtags, $user_ID; 10 10 11 11 if ( is_object($postarr) ) … … 197 197 } 198 198 } else if ($post_status == 'static') { 199 generate_page_rewrite_rules();199 $wp_rewrite->flush_rules(); 200 200 201 201 if ( !empty($page_template) ) … … 527 527 528 528 function wp_delete_post($postid = 0) { 529 global $wpdb ;529 global $wpdb, $wp_rewrite; 530 530 $postid = (int) $postid; 531 531 … … 560 560 561 561 if ( 'static' == $post->post_status ) 562 generate_page_rewrite_rules();563 562 $wp_rewrite->flush_rules(); 563 564 564 return $post; 565 565 } … … 819 819 if ( $page_attachment_rewrite_rules ) 820 820 update_option('page_attachment_uris', $page_attachment_rewrite_rules); 821 822 save_mod_rewrite_rules();823 821 } 824 822 }
Note: See TracChangeset
for help on using the changeset viewer.