Gerrit Patch Uploader has uploaded a new change for review. https://gerrit.wikimedia.org/r/238131
Change subject: Load the module mediawiki.page.watch.ajax only when required ...................................................................... Load the module mediawiki.page.watch.ajax only when required Load the module mediawiki.page.watch.ajax only when there is a watch button on the page. This change uses the same check as buildContentNavigationUrls() in SkinTemplate.php. Bug: T112523 Change-Id: I78895ffea1290f8c1d90630851d0d3d443800d66 --- M includes/skins/Skin.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/31/238131/1 diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 53af3e7..eae6cf1 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -204,6 +204,7 @@ if ( $wgEnableAPI ) { if ( $wgEnableWriteAPI && $wgAjaxWatch && $user->isLoggedIn() && $user->isAllowed( 'writeapi' ) + && $this->getRelevantTitle()->canExist() ) { $modules['watch'][] = 'mediawiki.page.watch.ajax'; } -- To view, visit https://gerrit.wikimedia.org/r/238131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78895ffea1290f8c1d90630851d0d3d443800d66 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Gerrit Patch Uploader <gerritpatchuploa...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits