From: Mark A. Hershberger Date: Tue, 16 Feb 2010 03:37:19 +0000 (+0000) Subject: * When I found it, I cried. fixes bug #22501 X-Git-Tag: 1.31.0-rc.0~37730 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=5259e9009d7530ed6dd3534c721995e4c7250331;p=lhc%2Fweb%2Fwiklou.git * When I found it, I cried. fixes bug #22501 * Also, fix up showtitle for parser tests to always give a title, whether we're setting a display title or not. --- diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index c7cae737a6..ea5840e667 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -192,6 +192,7 @@ class ParserOutput if( $t === '' ) { return false; } + return $t; } /** diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 3b2e6f0935..6526da90ea 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -371,7 +371,8 @@ class ParserTest { $out = $output->getText(); if ( isset( $opts['showtitle'] ) ) { - $out = $output->getTitleText() . "\n$out"; + if($output->getTitleText()) $title = $output->getTitleText(); + $out = "$title\n$out"; } if (isset( $opts['ill'] ) ) { $out = $this->tidy( implode( ' ', $output->getLanguageLinks() ) ); @@ -556,8 +557,6 @@ class ParserTest { 'wgHtml5' => true, 'wgWellFormedXml' => true, 'wgAllowMicrodataAttributes' => true, - 'wgAllowDisplayTitle' => true, - 'wgRestrictDisplayTitle' => false, ); if ($config) { diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index c68c10a305..023f955a1b 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -7785,10 +7785,13 @@ Bar foo Verify that displaytitle works (bug #22501) no displaytitle !! options showtitle +!! config +wgAllowDisplayTitle=true +wgRestrictDisplayTitle=false !! input this is not the the title !! result - +Parser test

this is not the the title

!! end @@ -7799,6 +7802,7 @@ Verify that displaytitle works (bug #22501) RestrictDisplayTitle=false showtitle title=[[Screen]] !! config +wgAllowDisplayTitle=true wgRestrictDisplayTitle=false !! input this is not the the title @@ -7815,12 +7819,13 @@ Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true mismatch showtitle title=[[Screen]] !! config +wgAllowDisplayTitle=true wgRestrictDisplayTitle=true !! input this is not the the title {{DISPLAYTITLE:whatever}} !! result - +Screen

this is not the the title

!! end @@ -7831,6 +7836,7 @@ Verify that displaytitle works (bug #22501) RestrictDisplayTitle=true matching showtitle title=[[Screen]] !! config +wgAllowDisplayTitle=true wgRestrictDisplayTitle=true !! input this is not the the title @@ -7852,7 +7858,7 @@ wgAllowDisplayTitle=false this is not the the title {{DISPLAYTITLE:screen}} !! result - +Screen

this is not the the title Template:DISPLAYTITLE:screen

@@ -7868,7 +7874,7 @@ wgAllowDisplayTitle=false !! input this is not the the title !! result - +Screen

this is not the the title

!! end