Don't load DT on edit pages

Bug: T239873
Change-Id: I2aaa2f008d08dd5be9e0dfa980a68a9bfda91b44
This commit is contained in:
Ed Sanders 2019-12-09 14:43:39 +00:00
parent da668b72d5
commit e2c31a8450

View file

@ -33,7 +33,11 @@ class DiscussionToolsHooks {
*/
public static function onBeforePageDisplay( OutputPage $output, Skin $skin ) {
$title = $output->getTitle();
$actionName = Action::getActionName( $output->getContext() );
if (
// Don't show on edit pages
$actionName !== 'edit' &&
$actionName !== 'submit' &&
// Only wikitext pages (e.g. not Flow boards)
$title->getContentModel() === CONTENT_MODEL_WIKITEXT &&
$title->isTalkPage()