From: Alexandre Emsenhuber Date: Sat, 10 Jan 2009 19:41:11 +0000 (+0000) Subject: Fix for r45648: only change page title if it's not an empty string (which is the... X-Git-Tag: 1.31.0-rc.0~43463 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=8eeb88abd0790f3f6259e2efcaf6b621a8a7eb49;p=lhc%2Fweb%2Fwiklou.git Fix for r45648: only change page title if it's not an empty string (which is the default value) --- 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;