From de0847f16ccb3ee3b2525d507d1af039a63ef464 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 4 Apr 2010 08:55:01 +0000 Subject: [PATCH] * (bug 22496) Viewing diff of a redirect page without specifying "oldid" parameter no longer makes the page displayed as being the redirect target --- RELEASE-NOTES | 2 ++ includes/Wiki.php | 1 + 2 files changed, 3 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f1c549b969..b0552f4c37 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -79,6 +79,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN language * (bug 22852) "Served in" comment is now the time used to cache a single page when using rebuildFileCache.php +* (bug 22496) Viewing diff of a redirect page without specifying "oldid" + parameter no longer makes the page displayed as being the redirect target === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent diff --git a/includes/Wiki.php b/includes/Wiki.php index 8fb75ceb6b..de1f9db3e7 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -319,6 +319,7 @@ class MediaWiki { $file = ($title->getNamespace() == NS_FILE) ? $article->getFile() : null; if( ( $action == 'view' || $action == 'render' ) // ... for actions that show content && !$request->getVal( 'oldid' ) && // ... and are not old revisions + !$request->getVal( 'diff' ) && // ... and not when showing diff $request->getVal( 'redirect' ) != 'no' && // ... unless explicitly told not to // ... and the article is not a non-redirect image page with associated file !( is_object( $file ) && $file->exists() && !$file->getRedirected() ) ) -- 2.20.1