From 190c1d2dd9d442a935b3c3dbfd927c44d317a848 Mon Sep 17 00:00:00 2001 From: Fran Rogers Date: Fri, 10 Oct 2008 06:00:46 +0000 Subject: [PATCH] Fix template-included categories from 'leaking' from older revisions when cascading protection is on. --- RELEASE-NOTES | 1 + includes/Article.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 00256b81bd..ec1106eb63 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -258,6 +258,7 @@ The following extensions are migrated into MediaWiki 1.14: * (bug 15869) Nostalgia skin does not show page title in printable mode * (bug 15795) Special:Userrights is now listed on Special:SpecialPages when the user can only his rights +* (bug 15846) Categories "leak" from older revisions in certain circumstances === API changes in 1.14 === diff --git a/includes/Article.php b/includes/Article.php index 69f1fe932b..a142d502bd 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -3522,7 +3522,7 @@ class Article { $wgUseFileCache = false; } - if ( !wfReadOnly() && $this->mTitle->areRestrictionsCascading() ) { + if ( $this->isCurrent() && !wfReadOnly() && $this->mTitle->areRestrictionsCascading() ) { // templatelinks table may have become out of sync, // especially if using variable-based transclusions. // For paranoia, check if things have changed and if -- 2.20.1