From 69b77c726f415df28d29474c3c43ca4e00248466 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 2 Jul 2008 10:33:42 +0000 Subject: [PATCH] Append subtitle to keep existing stuff for redirects (bug 14696) --- includes/Article.php | 8 ++++---- includes/ImagePage.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 2ce69059c1..44693f815e 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -861,7 +861,7 @@ class Article { } elseif ( $rt = Title::newFromRedirect( $text ) ) { - # Don't overwrite the subtitle if this was an old revision + # Don't append the subtitle if this was an old revision $this->viewRedirect( $rt, !$wasRedirected && $this->isCurrent() ); $parseout = $wgParser->parse($text, $this->mTitle, ParserOptions::newFromUser($wgUser)); $wgOut->addParserOutputNoText( $parseout ); @@ -925,15 +925,15 @@ class Article { wfProfileOut( __METHOD__ ); } - protected function viewRedirect( $target, $overwriteSubtitle = true, $forceKnown = false ) { + protected function viewRedirect( $target, $appendSubtitle = true, $forceKnown = false ) { global $wgParser, $wgOut, $wgContLang, $wgStylePath, $wgUser; # Display redirect $imageDir = $wgContLang->isRTL() ? 'rtl' : 'ltr'; $imageUrl = $wgStylePath.'/common/images/redirect' . $imageDir . '.png'; - if( $overwriteSubtitle ) { - $wgOut->setSubtitle( wfMsgHtml( 'redirectpagesub' ) ); + if( $appendSubtitle ) { + $wgOut->appendSubtitle( wfMsgHtml( 'redirectpagesub' ) ); } $sk = $wgUser->getSkin(); if ( $forceKnown ) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 5d4db92eee..30fcf13e6a 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -67,7 +67,7 @@ class ImagePage extends Article { // probably the redirect page itself. Fake the redirect symbol $wgOut->setPageTitle( $this->mTitle->getPrefixedText() ); $this->viewRedirect( Title::makeTitle( NS_IMAGE, $this->img->getName() ), - /* $overwriteSubtitle */ true, /* $forceKnown */ true ); + /* $appendSubtitle */ true, /* $forceKnown */ true ); $this->viewUpdates(); return; } -- 2.20.1