Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/215948

Change subject: Don't load Gather on all pages
......................................................................

Don't load Gather on all pages

Only pages that can contain content can be added to a watchlist/gather
collection, so it's not needed to load gather on all other pages (e.g. special
pages).

Bug: T101284
Change-Id: I951a760a887bc57d1dcfe388c8246b1e62b5f02a
---
M includes/Gather.hooks.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather 
refs/changes/48/215948/1

diff --git a/includes/Gather.hooks.php b/includes/Gather.hooks.php
index 666ad51..483386a 100644
--- a/includes/Gather.hooks.php
+++ b/includes/Gather.hooks.php
@@ -205,7 +205,11 @@
         * @return boolean
         */
        public static function onSkinMinervaDefaultModules( $skin, &$modules ) {
-               if ( MobileContext::singleton()->isBetaGroupMember() ) {
+               // load gather only on pages, that can contain content and in 
mobile beta view
+               if (
+                       $skin->getTitle()->canExist() &&
+                       MobileContext::singleton()->isBetaGroupMember()
+               ) {
                        $modules['watch'] = array( 'ext.gather.init' );
                }
                return true;

-- 
To view, visit https://gerrit.wikimedia.org/r/215948
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I951a760a887bc57d1dcfe388c8246b1e62b5f02a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to