From ee341b580a4893baeb7f0b6be9daad88a59644a3 Mon Sep 17 00:00:00 2001 From: Ilmari Karonen Date: Mon, 6 Dec 2010 01:08:17 +0000 Subject: [PATCH] Fix bug causing rebuildFileCache.php to create inappropriate cache files for redirects. (Actually, it would be better to create _correct_ cache files for them instead, but this doesn't seem to be something the file cache was designed to do, so I'll leave it for later.) --- RELEASE-NOTES | 1 + includes/Article.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3fa46c5aaa..b50d437ac7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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. diff --git a/includes/Article.php b/includes/Article.php index 1b5e70f8b5..7dd2ddc4f1 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ) ); -- 2.20.1