From 22518cefe2f8ce091c4f7bffe58420697ec12d3d Mon Sep 17 00:00:00 2001 From: markjaquith Date: Mon, 19 Oct 2009 21:10:46 +0000 Subject: [PATCH] Revert to old options table storage of rewrite_rules. Transient object caches would silently regenerate rewrite_rules without giving plugins a chance to readd endpoints. fixes #10981 git-svn-id: http://svn.automattic.com/wordpress/trunk@12061 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/schema.php | 2 +- wp-includes/rewrite.php | 8 ++++---- wp-includes/version.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index 897fa9d968..437a4ea600 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -353,7 +353,7 @@ function populate_options() { // Delete unused options $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing', 'autosave_interval', 'deactivated_plugins', 'can_compress_scripts', - 'page_uris', 'rewrite_rules', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length'); + 'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length'); foreach ($unusedoptions as $option) delete_option($option); } diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index c04c6a7ea1..6eecf6a5af 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -1607,11 +1607,11 @@ class WP_Rewrite { * @return array Rewrite rules. */ function wp_rewrite_rules() { - $this->rules = get_transient('rewrite_rules'); + $this->rules = get_option('rewrite_rules'); if ( empty($this->rules) ) { $this->matches = 'matches'; $this->rewrite_rules(); - set_transient('rewrite_rules', $this->rules); + update_option('rewrite_rules', $this->rules); } return $this->rules; @@ -1822,10 +1822,10 @@ class WP_Rewrite { * * @since 2.0.1 * @access public - * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules transient (soft flush). Default is true (hard). + * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard). */ function flush_rules($hard = true) { - delete_transient('rewrite_rules'); + delete_option('rewrite_rules'); $this->wp_rewrite_rules(); if ( $hard && function_exists('save_mod_rewrite_rules') ) save_mod_rewrite_rules(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 0c555a24d0..c41bbe5bb2 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -15,7 +15,7 @@ $wp_version = '2.9-rare'; * * @global int $wp_db_version */ -$wp_db_version = 12024; +$wp_db_version = 12060; /** * Holds the TinyMCE version