From a0647956de5cc079c94abec3445fbf77a8a1bdac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 22 Aug 2022 20:46:31 +0200 Subject: [PATCH] Make visualenhancements_pageframe features respect visualenhancements preference Follow-up to I481e885b54a1aeb9dd69a08dc614ab5f4f94b41e. Change-Id: Ia62a8b4441371956457a40117e8f4d05cdf2cb1c --- includes/Hooks/HookUtils.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/Hooks/HookUtils.php b/includes/Hooks/HookUtils.php index d9df730bc..94c9ea16c 100644 --- a/includes/Hooks/HookUtils.php +++ b/includes/Hooks/HookUtils.php @@ -350,6 +350,14 @@ class HookUtils { return false; } + // Subfeatures are disabled if the main feature is disabled + if ( ( + $feature === static::VISUALENHANCEMENTS_REPLY || + $feature === static::VISUALENHANCEMENTS_PAGEFRAME + ) && !self::isFeatureEnabledForOutput( $output, static::VISUALENHANCEMENTS ) ) { + return false; + } + // ?dtenable=1 overrides all user and title checks $queryEnable = $output->getRequest()->getRawVal( 'dtenable' ) ?: // Extra hack for parses from API, where this parameter isn't passed to derivative requests