Timeless should only generate body of page

In I203881d7ab035bc953d113106f21348187b51374 a bodyOnly skin
option was added to allow skins to be limited to generation of the
body tag contents. When used, generation of html, body, and head is
deferred to OutputPage.

Since Timeless is deployed on Wikimedia wikis, this is preferred
as it guarantees that debugging information, and head
tags are consistent for all Wikimedia deployed skins.

Bug: T62846
Change-Id: I3353f8b63e8acf3ab29d8c24dd868ad3f121e5bb
isekai
Jon Robson 3 years ago committed by Jdlrobson
parent 26a0b0970f
commit 8c814579b6

@ -12,7 +12,6 @@ use File;
use Html;
use Linker;
use MediaWiki\MediaWikiServices;
use MWDebug;
use ResourceLoaderSkinModule;
use Sanitizer;
use SpecialPage;
@ -58,10 +57,7 @@ class TimelessTemplate extends BaseTemplate {
$this->pileOfTools = $this->getPageTools();
$userLinks = $this->getUserLinks();
// Open html, body elements, etc
$html = $this->get( 'headelement' );
$html .= Html::openElement( 'div', [ 'id' => 'mw-wrapper', 'class' => $userLinks['class'] ] );
$html = Html::openElement( 'div', [ 'id' => 'mw-wrapper', 'class' => $userLinks['class'] ] );
$html .= Html::rawElement( 'div', [ 'id' => 'mw-header-container', 'class' => 'ts-container' ],
Html::rawElement( 'div', [ 'id' => 'mw-header', 'class' => 'ts-inner' ],
@ -112,15 +108,6 @@ class TimelessTemplate extends BaseTemplate {
$html .= Html::closeElement( 'div' );
// BaseTemplate::printTrail() stuff (has no get version)
// Required for RL to run
$html .= MWDebug::getDebugHTML( $this->getSkin()->getContext() );
$html .= $this->get( 'bottomscripts' );
$html .= $this->get( 'reporttime' );
$html .= Html::closeElement( 'body' );
$html .= Html::closeElement( 'html' );
// The unholy echo
echo $html;
}

@ -8,7 +8,7 @@
"license-name": "GPL-2.0-or-later",
"type": "skin",
"requires": {
"MediaWiki": ">= 1.38"
"MediaWiki": ">= 1.39"
},
"ValidSkinNames": {
"timeless": {
@ -17,6 +17,7 @@
"args": [
{
"name": "timeless",
"bodyOnly": true,
"template": "MediaWiki\\Skin\\Timeless\\TimelessTemplate",
"responsive": true,
"styles": [

Loading…
Cancel
Save