$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() ) );
'wgHtml5' => true,
'wgWellFormedXml' => true,
'wgAllowMicrodataAttributes' => true,
- 'wgAllowDisplayTitle' => true,
- 'wgRestrictDisplayTitle' => false,
);
if ($config) {
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
<p>this is not the the title
</p>
!! end
showtitle
title=[[Screen]]
!! config
+wgAllowDisplayTitle=true
wgRestrictDisplayTitle=false
!! input
this is not the the title
showtitle
title=[[Screen]]
!! config
+wgAllowDisplayTitle=true
wgRestrictDisplayTitle=true
!! input
this is not the the title
{{DISPLAYTITLE:whatever}}
!! result
-
+Screen
<p>this is not the the title
</p>
!! end
showtitle
title=[[Screen]]
!! config
+wgAllowDisplayTitle=true
wgRestrictDisplayTitle=true
!! input
this is not the the title
this is not the the title
{{DISPLAYTITLE:screen}}
!! result
-
+Screen
<p>this is not the the title
<a href="/index.php?title=Template:DISPLAYTITLE:screen&action=edit&redlink=1" class="new" title="Template:DISPLAYTITLE:screen (page does not exist)">Template:DISPLAYTITLE:screen</a>
</p>
!! input
this is not the the title
!! result
-
+Screen
<p>this is not the the title
</p>
!! end