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

Change subject: Alternative way of setting resource paths
......................................................................


Alternative way of setting resource paths

To cater for the need to have a title at that point which is not the case
for $wgExtensionFunctions.

So far, only testing it on mediawiki.org

Change-Id: Ibac6da6903681b088a31c9e3e414e13b504d6c33
---
M wmf-config/mobile.php
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 38672e3..675d9eb 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -44,7 +44,14 @@
        // looking for X-WAP headers in requests coming from Squid
        if ( $wmgMFVaryResources ) {
                $wgMFVaryResources = true;
-               $wgExtensionFunctions[] = 'wmfSetupMobileLoadScript';
+               if ( $wgDBname === 'mediawikiwiki' ) {
+                       $wgHooks['BeforeInitialize'] = 
$wgHooks['ResourceLoaderRegisterModules'] = function() {
+                               wmfSetupMobileLoadScript();
+                               return true;
+                       };
+               } else {
+                       $wgExtensionFunctions[] = 'wmfSetupMobileLoadScript';
+               }
        }
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibac6da6903681b088a31c9e3e414e13b504d6c33
Gerrit-PatchSet: 5
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: awjrichards <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to