From: Mark A. Hershberger
Date: Mon, 15 Feb 2010 20:18:05 +0000 (+0000)
Subject: fixes #22501 follow up r61101 remove superfluous, buggy code that was over-rideing...
X-Git-Tag: 1.31.0-rc.0~37745
X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24id_article%22%29%20.%20%22?a=commitdiff_plain;h=b03bcaacd9771eb5a1e9af2ad9eca1fd2229f11a;p=lhc%2Fweb%2Fwiklou.git
fixes #22501 follow up r61101 remove superfluous, buggy code that was over-rideing displaytitle
---
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 3bc6a1ced2..298aa3d41a 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -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 );
diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc
index b3f1a647dd..73b330b7b2 100644
--- a/maintenance/parserTests.inc
+++ b/maintenance/parserTests.inc
@@ -556,6 +556,8 @@ 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 5eb095ca3a..aa59a2cd22 100644
--- a/maintenance/parserTests.txt
+++ b/maintenance/parserTests.txt
@@ -7781,7 +7781,30 @@ Bar foo
!! end
+!! test
+Verify that displaytitle works (bug #22501) no displaytitle
+!! options
+showtitle
+!! input
+this is not the the title
+!! result
+
+this is not the the title
+
+!! end
+!! test
+Verify that displaytitle works (bug #22501)
+!! options
+showtitle
+!! input
+this is not the the title
+{{DISPLAYTITLE:screen}}
+!! result
+screen
+this is not the the title
+
+!! end
TODO:
more images