Fix for r45648: only change page title if it's not an empty string (which is the...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 10 Jan 2009 19:41:11 +0000 (19:41 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 10 Jan 2009 19:41:11 +0000 (19:41 +0000)
includes/OutputPage.php

index b728f06..94742e7 100644 (file)
@@ -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;