Make visualenhancements_pageframe features respect visualenhancements preference

Follow-up to I481e885b54a1aeb9dd69a08dc614ab5f4f94b41e.

Change-Id: Ia62a8b4441371956457a40117e8f4d05cdf2cb1c
This commit is contained in:
Bartosz Dziewoński 2022-08-22 20:46:31 +02:00
parent 837591f12e
commit a0647956de

View file

@ -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