From: Brion Vibber Date: Tue, 10 Jan 2006 23:57:30 +0000 (+0000) Subject: Reverting image redirect fix; side effects: X-Git-Tag: 1.6.0~619 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=ee3499cddbed3844da23430da00a830957040749;p=lhc%2Fweb%2Fwiklou.git Reverting image redirect fix; side effects: * no 'redirected from' backlink * redirect=no mode failed to work --- diff --git a/includes/Wiki.php b/includes/Wiki.php index 459af436ac..8d62167e37 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -1,23 +1,13 @@ param[strtolower( $key )] = $value; } - - /** - * Retrieves parameters - */ + function getVal( $key, $default = "" ) { $key = strtolower( $key ); if( isset( $this->params[$key] ) ) { @@ -26,11 +16,7 @@ class MediaWiki { return $default; } - /** - * Creates the article to be known as $wgArticle - */ - function initializeArticle( &$title, &$request, $action ) { - // Fix Media namespace + function initializeArticle( &$title, $request, $action ) { if( NS_MEDIA == $title->getNamespace() ) { $title = Title::makeTitle( NS_IMAGE, $title->getDBkey() ); } @@ -45,31 +31,22 @@ class MediaWiki { # Reload from the page pointed to later $article->mContentLoaded = false; $ns = $rTitle->getNamespace(); - $wasRedirected = true; } } // Categories and images are handled by a different class if( $ns == NS_IMAGE ) { - $b4 = $title->getPrefixedText(); unset($article); require_once( 'includes/ImagePage.php' ); - $article = new ImagePage( $title ); - if( isset( $wasRedirected ) ) { - $article->mTitle = $rTitle; - $article->mRedirectedFrom = $b4; - } + return new ImagePage( $title ); } elseif( $ns == NS_CATEGORY ) { unset($article); require_once( 'includes/CategoryPage.php' ); - $article = new CategoryPage( $title ); + return new CategoryPage( $title ); } return $article; } - /** - * Performs any of a wide range of passed actions - */ function performAction( $action, &$output, &$article, &$title, &$user, &$request ) { switch( $action ) { case 'view':