Fix bug causing rebuildFileCache.php to create inappropriate cache files for redirect...
authorIlmari Karonen <vyznev@users.mediawiki.org>
Mon, 6 Dec 2010 01:08:17 +0000 (01:08 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Mon, 6 Dec 2010 01:08:17 +0000 (01:08 +0000)
RELEASE-NOTES
includes/Article.php

index 3fa46c5..b50d437 100644 (file)
@@ -458,6 +458,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes.
   absolute URLs in the sitemap index (as required e.g. by Google)
 * Partial workaround for bug 6220: at least make files on shared repositories
   show up as (struck-out) bluelinks instead of redlinks on Special:WantedFiles
+* rebuildFileCache.php no longer creates inappropriate cache files for redirects
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.
index 1b5e70f..7dd2ddc 100644 (file)
@@ -3920,7 +3920,7 @@ class Article {
                $cacheable = false;
 
                if ( HTMLFileCache::useFileCache() ) {
-                       $cacheable = $this->getID() && !$this->mRedirectedFrom;
+                       $cacheable = $this->getID() && !$this->mRedirectedFrom && !$this->mTitle->isRedirect();
                        // Extension may have reason to disable file caching on some pages.
                        if ( $cacheable ) {
                                $cacheable = wfRunHooks( 'IsFileCacheable', array( &$this ) );