From b03bcaacd9771eb5a1e9af2ad9eca1fd2229f11a Mon Sep 17 00:00:00 2001
From: "Mark A. Hershberger"
Date: Mon, 15 Feb 2010 20:18:05 +0000
Subject: [PATCH] fixes #22501 follow up r61101 remove superfluous, buggy code
that was over-rideing displaytitle
---
includes/parser/Parser.php | 7 -------
maintenance/parserTests.inc | 2 ++
maintenance/parserTests.txt | 23 +++++++++++++++++++++++
3 files changed, 25 insertions(+), 7 deletions(-)
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
--
2.20.1