From: Victor Vasiliev Date: Sun, 20 Jan 2008 16:05:44 +0000 (+0000) Subject: * Don't follow redirects if image exists X-Git-Tag: 1.31.0-rc.0~49883 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=bf01bc026bd61c7991effee71bf395ab7d0db41e;p=lhc%2Fweb%2Fwiklou.git * Don't follow redirects if image exists --- 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));