From 201ff65e60f9e1e5c92f7437f6c9975751a0347a Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 2 May 2009 15:38:32 +0000 Subject: [PATCH] Fix interesting regression from r49324: on a redirected page view, the content action tabs (article, discussion, edit, history) would point to the redirect instead of the target article. --- includes/Wiki.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 503bf8d4cc..0753456310 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -60,7 +60,7 @@ class MediaWiki { return; } if( !$this->initializeSpecialCases( $title, $output, $request ) ) { - $new_article = $this->initializeArticle( $title, $request ); + $new_article = $this->initializeArticle( $title, $output, $request ); if( is_object( $new_article ) ) { $article = $new_article; $this->performAction( $output, $article, $title, $user, $request ); @@ -274,10 +274,11 @@ class MediaWiki { * Create an Article object for the page, following redirects if needed. * * @param $title Title ($wgTitle) - * @param $request WebRequest + * @param $output OutputPage ($wgOut) + * @param $request WebRequest ($wgRequest) * @return mixed an Article, or a string to redirect to another URL */ - function initializeArticle( &$title, $request ) { + function initializeArticle( &$title, &$output, $request ) { wfProfileIn( __METHOD__ ); $action = $this->getVal( 'action', 'view' ); @@ -324,6 +325,7 @@ class MediaWiki { $rarticle->setRedirectedFrom( $title ); $article = $rarticle; $title = $target; + $output->setTitle( $title ); } } } else { -- 2.20.1