From 5c5073b5ba2c6c94bf054b9614c11bd08d1de248 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 11 Jan 2023 18:35:51 +0000 Subject: [PATCH] Enable visual enhancements on all talk namespaces Bug: T325417 Change-Id: I099a7d03f059f08595dec43ff0205fd5ba765885 --- extension.json | 4 ---- includes/Hooks/HookUtils.php | 8 ++------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/extension.json b/extension.json index 3d91bd374..01f195a1b 100644 --- a/extension.json +++ b/extension.json @@ -520,10 +520,6 @@ "value": "default", "description": "Override availability of DiscussionTools visual enhancements. 'default', 'available', or 'unavailable'." }, - "DiscussionTools_visualenhancements_namespaces": { - "value": [ 1, 3 ], - "description": "Namespaces on which visual enhancements are available. Array of namespaces IDs (numbers), or `true` to enable on all namespaces/pages which have DiscussionTools." - }, "DiscussionTools_visualenhancements_pageframe": { "value": "default", "description": "Override availability of DiscussionTools visual enhancements's page frame sub-feature. 'default', 'available', or 'unavailable'." diff --git a/includes/Hooks/HookUtils.php b/includes/Hooks/HookUtils.php index 6de3b95b2..6ee3838c3 100644 --- a/includes/Hooks/HookUtils.php +++ b/includes/Hooks/HookUtils.php @@ -330,12 +330,8 @@ class HookUtils { $services = MediaWikiServices::getInstance(); if ( $feature === static::VISUALENHANCEMENTS ) { - $dtConfig = $services->getConfigFactory()->makeConfig( 'discussiontools' ); - $namespaces = $dtConfig->get( 'DiscussionTools_visualenhancements_namespaces' ); - if ( is_array( $namespaces ) ) { - // Only allow visual enhancements in specified namespaces - return in_array( $title->getNamespace(), $namespaces, true ); - } + // Visual enhancements are only enabled on talk namespaces (T325417) + return $title->isTalkPage(); } $hasNewSectionLink = static::hasPagePropCached( $title, 'newsectionlink' );