jenkins-bot has submitted this change and it was merged.

Change subject: Correct RL targets for site module and user module
......................................................................


Correct RL targets for site module and user module

Change-Id: I5615418e3b2c07386cabaa48d9d9dc7054ce6135
---
M includes/Resources.php
M includes/modules/MobileSiteModule.php
M includes/modules/MobileUserModule.php
M includes/skins/SkinMinerva.php
4 files changed, 13 insertions(+), 5 deletions(-)

Approvals:
  Phuedx: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Resources.php b/includes/Resources.php
index f6e6c99..58d01f5 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -1315,7 +1315,6 @@
                        // These modules should only setup routes/events or
                        // load code under certain conditions.
                        'mobile.watchstar',
-                       'mobile.site',
                        'mobile.issues',
                        'mobile.search',
                        'mobile.references',
diff --git a/includes/modules/MobileSiteModule.php 
b/includes/modules/MobileSiteModule.php
index e3cc71c..50210b9 100644
--- a/includes/modules/MobileSiteModule.php
+++ b/includes/modules/MobileSiteModule.php
@@ -5,10 +5,14 @@
 
 /**
  * Extends ResourceLoaderSiteModule (Module for site customizations).
+ * Mobile.[css|js] is a temporary drop in replacement for Common.css which 
predates Minerva
+ * and is not compatible.
  */
 class MobileSiteModule extends ResourceLoaderSiteModule {
-       /** @var array Saves the target for the module (e.g. desktop and 
mobile). */
-       protected $targets = array( 'mobile', 'desktop' );
+       /** @var array Saves the target for the module.
+        * Should not be enabled on desktop which has ResourceLoaderSiteModule
+        */
+       protected $targets = array( 'mobile' );
 
        /**
         * Gets list of pages used by this module.
diff --git a/includes/modules/MobileUserModule.php 
b/includes/modules/MobileUserModule.php
index 3e8e483..91bd2c7 100644
--- a/includes/modules/MobileUserModule.php
+++ b/includes/modules/MobileUserModule.php
@@ -5,10 +5,14 @@
 
 /**
  * Extends ResourceLoaderUserModule (Module for user-specific site 
customizations).
+ * This differs from the user module as we currently do not load User's
+ * common.js or user common.css as these predate Minerva and may be broken.
  */
 class MobileUserModule extends ResourceLoaderUserModule {
-       /** @var array Sets the target for the module (e.g. desktop and 
mobile). */
-       protected $targets = array( 'mobile', 'desktop' );
+       /** @var array Sets the target for the module (e.g. desktop and mobile).
+        * Note this is mobile only as core already has an instance of 
ResourceLoaderUserModule
+        */
+       protected $targets = array( 'mobile' );
 
        /**
         * Gets list of pages used by this module.
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index ceb7ce3..231297b 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -961,6 +961,7 @@
                        $modules['toggling'] = array( 'mobile.toggling' );
                        $modules['eventlogging'] = array( 
'mobile.loggingSchemas' );
                }
+               $modules['site'] = 'mobile.site';
 
                // FIXME: Upstream?
                wfRunHooks( 'SkinMinervaDefaultModules', array( $this, 
&$modules ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5615418e3b2c07386cabaa48d9d9dc7054ce6135
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to