From: Alexandre Emsenhuber Date: Sun, 4 Apr 2010 08:55:01 +0000 (+0000) Subject: * (bug 22496) Viewing diff of a redirect page without specifying "oldid" parameter... X-Git-Tag: 1.31.0-rc.0~37254 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=de0847f16ccb3ee3b2525d507d1af039a63ef464;p=lhc%2Fweb%2Fwiklou.git * (bug 22496) Viewing diff of a redirect page without specifying "oldid" parameter no longer makes the page displayed as being the redirect target --- 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() ) )