From d77ec1aaba045c7d0aaec245a1b60bec8255fd95 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Wed, 27 Jun 2007 01:01:22 +0000 Subject: [PATCH] (bug 10377) "Permanent links" to revisions still work if the page is moved and the redirect deleted --- RELEASE-NOTES | 3 ++- includes/Article.php | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f0aca9a678..ef4f213ff8 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -215,7 +215,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 10372) namespaceDupes.php no longer ignores namespace aliases * (bug 10198) namespaceDupes.php no longer ignores interwiki prefixes * namespaceDupes.php should work better for initial-lowercase wikis - +* (bug 10377) "Permanent links" to revisions still work if the page is moved + and the redirect deleted == API changes since 1.10 == diff --git a/includes/Article.php b/includes/Article.php index 5c325c5234..50fca0b90e 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -141,7 +141,10 @@ class Article { wfProfileIn( __METHOD__ ); - if ( 0 == $this->getID() ) { + // We want to show the content even if the page doesn't exist, as long + // as the revision does (perhaps it's been moved and the redirect + // deleted: bug 10377) + if ( 0 == $this->getID() and !$this->mOldId ) { wfProfileOut( __METHOD__ ); $wgOut->setRobotpolicy( 'noindex,nofollow' ); -- 2.20.1