From bf01bc026bd61c7991effee71bf395ab7d0db41e Mon Sep 17 00:00:00 2001 From: Victor Vasiliev Date: Sun, 20 Jan 2008 16:05:44 +0000 Subject: [PATCH] * Don't follow redirects if image exists --- includes/Wiki.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 2a60262c83..e0a5744515 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -249,7 +249,8 @@ class MediaWiki { // Namespace might change when using redirects if( ( $action == 'view' || $action == 'render' ) && !$request->getVal( 'oldid' ) && - $request->getVal( 'redirect' ) != 'no' ) { + $request->getVal( 'redirect' ) != 'no' && + !( $wgTitle->getNamespace() == NS_IMAGE && wfFindFile( $wgTitle->getText() ) ) ) { $dbr = wfGetDB(DB_SLAVE); $article->loadPageData($article->pageDataFromTitle($dbr, $title)); -- 2.20.1