From f831643f08c974b5913f7f2676b440fc38e7cc1f Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Fri, 10 Jun 2022 12:53:18 -0700 Subject: [PATCH] Handles 1.39 deprecations, simplifies skin registration In 1.36 the skin registration process was modified to support registration for common skin meta data This removes warnings in >= 1.39. --- Pivot.skin.php | 24 ++---------------------- skin.json | 20 ++++++++++++++++++-- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/Pivot.skin.php b/Pivot.skin.php index 17f14ce..8b08118 100644 --- a/Pivot.skin.php +++ b/Pivot.skin.php @@ -9,8 +9,6 @@ class SkinPivot extends SkinTemplate { - public $skinname = 'pivot', $stylename = 'pivot', $template = 'pivotTemplate', $useHeadElement = true; - public function getDefaultModules() { global $wgPivotFeatures; $wgPivotFeaturesDefaults = array( @@ -37,29 +35,16 @@ class SkinPivot extends SkinTemplate { if ( $wgPivotFeatures['preloadFontAwesome'] ) { $this->getOutput()->addHeadItem('font', ''); } - - $this->getOutput()->addModuleStyles('skins.pivot.styles'); - return parent::getDefaultModules(); + return parent::getDefaultModules(); } - - public function initPage(OutputPage $out) { - global $wgLocalStylePath; - parent::initPage($out); - - $viewport_meta = 'width=device-width, user-scalable=yes, initial-scale=1.0'; - $out->addMeta('viewport', $viewport_meta); - $out->addModules('skins.pivot.js'); - } - } -class pivotTemplate extends BaseTemplate { +class PivotTemplate extends BaseTemplate { public function execute() { global $wgUser; global $wgPivotFeatures; Wikimedia\suppressWarnings(); - $this->html('headelement'); switch ($wgPivotFeatures['usePivotTabs']) { case true: ob_start(); @@ -277,15 +262,10 @@ class pivotTemplate extends BaseTemplate {
- - - printTrail(); ?> data['isarticle'] && $wgPivotFeatures['addThisPUBID'] !== '') { ?> - - = 1.35.0" + "MediaWiki": ">= 1.39.0" }, "MessagesDirs": { "Skinpivot": [