mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-13 18:37:07 +00:00
Don't load DT on edit pages
Bug: T239873 Change-Id: I2aaa2f008d08dd5be9e0dfa980a68a9bfda91b44
This commit is contained in:
parent
da668b72d5
commit
e2c31a8450
|
@ -33,7 +33,11 @@ class DiscussionToolsHooks {
|
||||||
*/
|
*/
|
||||||
public static function onBeforePageDisplay( OutputPage $output, Skin $skin ) {
|
public static function onBeforePageDisplay( OutputPage $output, Skin $skin ) {
|
||||||
$title = $output->getTitle();
|
$title = $output->getTitle();
|
||||||
|
$actionName = Action::getActionName( $output->getContext() );
|
||||||
if (
|
if (
|
||||||
|
// Don't show on edit pages
|
||||||
|
$actionName !== 'edit' &&
|
||||||
|
$actionName !== 'submit' &&
|
||||||
// Only wikitext pages (e.g. not Flow boards)
|
// Only wikitext pages (e.g. not Flow boards)
|
||||||
$title->getContentModel() === CONTENT_MODEL_WIKITEXT &&
|
$title->getContentModel() === CONTENT_MODEL_WIKITEXT &&
|
||||||
$title->isTalkPage()
|
$title->isTalkPage()
|
||||||
|
|
Loading…
Reference in a new issue