From b9f51bbd20adb0ce1fbefdf5c4e37280105cfb32 Mon Sep 17 00:00:00 2001 From: Morne Alberts Date: Thu, 20 Feb 2025 18:45:21 +0200 Subject: [PATCH] Remove bodyOnly --- src/ChameleonTemplate.php | 14 -------------- src/Hooks/SetupAfterCache.php | 3 +-- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/ChameleonTemplate.php b/src/ChameleonTemplate.php index 499a2e55..cab7c512 100644 --- a/src/ChameleonTemplate.php +++ b/src/ChameleonTemplate.php @@ -43,21 +43,7 @@ class ChameleonTemplate extends BaseTemplate { * @throws \MWException */ public function execute() { - $skin = $this->getSkin(); - $skinOptions = method_exists( $skin, 'getOptions' ) ? $skin->getOptions() : []; - // TODO: Remove $bodyOnly when dropping < MW 1.39 support. - $bodyOnly = $skinOptions['bodyOnly'] ?? false; - // output the head element - // The headelement defines the tag itself, it shouldn't be included in the html text - // To add attributes or classes to the body tag use OutputPageBodyAttributes hook - if ( !$bodyOnly ) { - $this->html( 'headelement' ); - } echo $this->getSkin()->getComponentFactory()->getRootComponent()->getHtml(); - if ( !$bodyOnly ) { - $this->printTrail(); - echo "\n"; - } } /** diff --git a/src/Hooks/SetupAfterCache.php b/src/Hooks/SetupAfterCache.php index 85cc2d27..eeb403c5 100644 --- a/src/Hooks/SetupAfterCache.php +++ b/src/Hooks/SetupAfterCache.php @@ -243,8 +243,7 @@ function () { return new Chameleon( [ 'name' => 'chameleon', - 'styles' => $styles, - 'bodyOnly' => version_compare( $this->configuration['wgVersion'], '1.39', '>=' ), + 'styles' => $styles ] ); } ); }