From 8eeb88abd0790f3f6259e2efcaf6b621a8a7eb49 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 10 Jan 2009 19:41:11 +0000 Subject: [PATCH] Fix for r45648: only change page title if it's not an empty string (which is the default value) --- includes/OutputPage.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b728f067b0..94742e7681 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -511,8 +511,6 @@ class OutputPage { $this->mLanguageLinks += $parserOutput->getLanguageLinks(); $this->addCategoryLinks( $parserOutput->getCategories() ); $this->mNewSectionLink = $parserOutput->getNewSection(); - if ($wgTitle->mNamespace !== NS_SPECIAL) - $this->setPageTitle($parserOutput->getTitleText()); if( is_null( $wgExemptFromUserRobotsControl ) ) { $bannedNamespaces = $wgContentNamespaces; @@ -540,9 +538,11 @@ class OutputPage { $this->mTemplateIds[$ns] = $dbks; } } - // Display title + // Page title if( ( $dt = $parserOutput->getDisplayTitle() ) !== false ) $this->setPageTitle( $dt ); + else if ( ( $title = $parserOutput->getTitleText() ) != '' ) + $this->setPageTitle( $title ); // Hooks registered in the object global $wgParserOutputHooks; -- 2.20.1