DiscussionToolsHooks: Only enable when viewing pages

Previously we'd also run on action=history, action=info etc. (which did nothing).

Change-Id: I4bd10311a91433f357a6f5506c65364d399f3915
This commit is contained in:
Bartosz Dziewoński 2020-04-01 22:48:51 +02:00
parent f92e07687f
commit 3bd513374e

View file

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