From 3bd513374ef7e634e975347c59ae0d1d970dbbaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Wed, 1 Apr 2020 22:48:51 +0200 Subject: [PATCH] DiscussionToolsHooks: Only enable when viewing pages Previously we'd also run on action=history, action=info etc. (which did nothing). Change-Id: I4bd10311a91433f357a6f5506c65364d399f3915 --- includes/DiscussionToolsHooks.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/DiscussionToolsHooks.php b/includes/DiscussionToolsHooks.php index 55e43b8df..587c29c34 100644 --- a/includes/DiscussionToolsHooks.php +++ b/includes/DiscussionToolsHooks.php @@ -57,9 +57,8 @@ class DiscussionToolsHooks { ); if ( - // Don't show on edit pages - $actionName !== 'edit' && - $actionName !== 'submit' && + // Don't show on edit pages, history, etc. + $actionName === 'view' && // Only wikitext pages (e.g. not Flow boards) $title->getContentModel() === CONTENT_MODEL_WIKITEXT && (