From: Huji Date: Wed, 13 Feb 2008 21:34:35 +0000 (+0000) Subject: (bug 13005) DISPLAYTITLE does not work on preview X-Git-Tag: 1.31.0-rc.0~49484 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=8fd7f4764b9c10323fbf8f64d183ddb32ac684eb;p=lhc%2Fweb%2Fwiklou.git (bug 13005) DISPLAYTITLE does not work on preview --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f5ac33bd04..efe8808499 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -394,7 +394,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN its callers already * (bug 12846) IE rtl.css issue in RTL wikis special:Preferences when selecting an LTR user language - +* (bug 13005) DISPLAYTITLE does not work on preview == Parser changes in 1.12 == diff --git a/includes/EditPage.php b/includes/EditPage.php index 33e40698c0..0cdc21c131 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1526,7 +1526,12 @@ END $wgOut->addParserOutputNoText( $parserOutput ); # ParserOutput might have altered the page title, so reset it - $wgOut->setPageTitle( wfMsg( 'editing', $wgTitle->getPrefixedText() ) ); + # Also, use the title defined by DISPLAYTITLE magic word when present + if( ( $dt = $parserOutput->getDisplayTitle() ) !== false ) { + $wgOut->setPageTitle( wfMsg( 'editing', $dt ) ); + } else { + $wgOut->setPageTitle( wfMsg( 'editing', $wgTitle->getPrefixedText() ) ); + } foreach ( $parserOutput->getTemplates() as $ns => $template) foreach ( array_keys( $template ) as $dbk)