fixes #22501 follow up r61101 remove superfluous, buggy code that was over-rideing...
authorMark A. Hershberger <mah@users.mediawiki.org>
Mon, 15 Feb 2010 20:18:05 +0000 (20:18 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Mon, 15 Feb 2010 20:18:05 +0000 (20:18 +0000)
includes/parser/Parser.php
maintenance/parserTests.inc
maintenance/parserTests.txt

index 3bc6a1c..298aa3d 100644 (file)
@@ -365,13 +365,6 @@ class Parser
                // won't pick it up.  This is probably expected behavior.
                if ( $wgContLang->getConvRuleTitle() ) {
                        $this->mOutput->setTitleText( $wgContLang->getConvRuleTitle() );
-               } elseif ( !( $wgDisableLangConversion
-                                         || isset( $this->mDoubleUnderscores['notitleconvert'] ) ) ) {
-                       if ( $title->getNamespace() == NS_SPECIAL ) {
-                               $this->setTitle( $wgContLang->convert( $title ) );
-                       } else {
-                               $this->mOutput->setTitleText( $wgContLang->convert( $title->getPrefixedText() ) );
-                       }
                }
 
                $text = $this->mStripState->unstripNoWiki( $text );
index b3f1a64..73b330b 100644 (file)
@@ -556,6 +556,8 @@ class ParserTest {
                        'wgHtml5' => true,
                        'wgWellFormedXml' => true,
                        'wgAllowMicrodataAttributes' => true,
+                       'wgAllowDisplayTitle' => true,
+                       'wgRestrictDisplayTitle' => false,
                );
 
                if ($config) {
index 5eb095c..aa59a2c 100644 (file)
@@ -7781,7 +7781,30 @@ Bar foo
 </p>
 !! end
 
+!! test
+Verify that displaytitle works (bug #22501) no displaytitle
+!! options
+showtitle
+!! input
+this is not the the title
+!! result
+
+<p>this is not the the title
+</p>
+!! end
 
+!! test
+Verify that displaytitle works (bug #22501)
+!! options
+showtitle
+!! input
+this is not the the title
+{{DISPLAYTITLE:screen}}
+!! result
+screen
+<p>this is not the the title
+</p>
+!! end
 
 TODO:
 more images