From a51bb552dc20a702ad65a0dbeb2b579cc2c9f376 Mon Sep 17 00:00:00 2001 From: Alex Monk Date: Sat, 18 Jul 2015 07:44:31 +0000 Subject: [PATCH] Revert "Add $wgGadgetsEnableLegacyGadgets to allow disabling of legacy gadgets" This reverts commit 036aa3d876d56a83fc43734f2c3510929709f544. Change-Id: I90840cbdaa1d6eabde3fffd113dc7a945a876e77 --- GadgetHooks.php | 9 ++------- extension.json | 3 +-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/GadgetHooks.php b/GadgetHooks.php index 2502a370..efec80aa 100644 --- a/GadgetHooks.php +++ b/GadgetHooks.php @@ -162,8 +162,6 @@ class GadgetHooks { * @return bool */ public static function beforePageDisplay( $out ) { - global $wgGadgetsEnableLegacyGadgets; - $gadgets = Gadget::loadList(); if ( !$gadgets ) { return true; @@ -191,11 +189,8 @@ class GadgetHooks { } } - // Check if legacy gadgets are even enabled - if ( $wgGadgetsEnableLegacyGadgets && - // Allow other extensions, e.g. MobileFrontend, to disallow legacy gadgets - Hooks::run( 'Gadgets::allowLegacy', array( $out->getContext() ) ) - ) { + // Allow other extensions, e.g. MobileFrontend, to disallow legacy gadgets + if ( Hooks::run( 'Gadgets::allowLegacy', array( $out->getContext() ) ) ) { $lb->execute( __METHOD__ ); $done = array(); diff --git a/extension.json b/extension.json index 2a39601e..1e1e2b74 100644 --- a/extension.json +++ b/extension.json @@ -56,8 +56,7 @@ }, "config": { "GadgetsCaching": true, - "GadgetsCacheType": false, - "GadgetsEnableLegacyGadgets": true + "GadgetsCacheType": false }, "manifest_version": 1 }