<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre, #msg p { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12061] trunk: Revert to old options table storage of rewrite_rules.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12061">12061</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2009-10-19 21:10:46 +0000 (Mon, 19 Oct 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>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 <a href="http://trac.wordpress.org/ticket/10981">#10981</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesschemaphp">trunk/wp-admin/includes/schema.php</a></li>
<li><a href="#trunkwpincludesrewritephp">trunk/wp-includes/rewrite.php</a></li>
<li><a href="#trunkwpincludesversionphp">trunk/wp-includes/version.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesschemaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/schema.php (12060 => 12061)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/schema.php        2009-10-19 20:23:35 UTC (rev 12060)
+++ trunk/wp-admin/includes/schema.php        2009-10-19 21:10:46 UTC (rev 12061)
</span><span class="lines">@@ -353,7 +353,7 @@
</span><span class="cx"> 
</span><span class="cx">         // Delete unused options
</span><span class="cx">         $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',
</span><del>-                'page_uris', 'rewrite_rules', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length');
</del><ins>+                'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length');
</ins><span class="cx">         foreach ($unusedoptions as $option)
</span><span class="cx">                 delete_option($option);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludesrewritephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/rewrite.php (12060 => 12061)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/rewrite.php        2009-10-19 20:23:35 UTC (rev 12060)
+++ trunk/wp-includes/rewrite.php        2009-10-19 21:10:46 UTC (rev 12061)
</span><span class="lines">@@ -1607,11 +1607,11 @@
</span><span class="cx">          * @return array Rewrite rules.
</span><span class="cx">          */
</span><span class="cx">         function wp_rewrite_rules() {
</span><del>-                $this-&gt;rules = get_transient('rewrite_rules');
</del><ins>+                $this-&gt;rules = get_option('rewrite_rules');
</ins><span class="cx">                 if ( empty($this-&gt;rules) ) {
</span><span class="cx">                         $this-&gt;matches = 'matches';
</span><span class="cx">                         $this-&gt;rewrite_rules();
</span><del>-                        set_transient('rewrite_rules', $this-&gt;rules);
</del><ins>+                        update_option('rewrite_rules', $this-&gt;rules);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 return $this-&gt;rules;
</span><span class="lines">@@ -1822,10 +1822,10 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 2.0.1
</span><span class="cx">          * @access public
</span><del>-         * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules transient (soft flush). Default is true (hard).
</del><ins>+         * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard).
</ins><span class="cx">          */
</span><span class="cx">         function flush_rules($hard = true) {
</span><del>-                delete_transient('rewrite_rules');
</del><ins>+                delete_option('rewrite_rules');
</ins><span class="cx">                 $this-&gt;wp_rewrite_rules();
</span><span class="cx">                 if ( $hard &amp;&amp; function_exists('save_mod_rewrite_rules') )
</span><span class="cx">                         save_mod_rewrite_rules();
</span></span></pre></div>
<a id="trunkwpincludesversionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/version.php (12060 => 12061)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/version.php        2009-10-19 20:23:35 UTC (rev 12060)
+++ trunk/wp-includes/version.php        2009-10-19 21:10:46 UTC (rev 12061)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @global int $wp_db_version
</span><span class="cx">  */
</span><del>-$wp_db_version = 12024;
</del><ins>+$wp_db_version = 12060;
</ins><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Holds the TinyMCE version
</span></span></pre>
</div>
</div>

</body>
</html>