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

Change subject: Hack for making sure $wgJsonConfigs['JsonZeroConfig'] is set 
late enough
......................................................................


Hack for making sure $wgJsonConfigs['JsonZeroConfig'] is set late enough

Change-Id: Ifd05c6ab8ffb70131bf82089be2ba263f1631774
---
M wmf-config/mobile.php
1 file changed, 10 insertions(+), 6 deletions(-)

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



diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 7a84ddd..275e575 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -34,12 +34,16 @@
                require_once( "$IP/extensions/JsonConfig/JsonConfig.php" );
                require_once( "$IP/extensions/ZeroBanner/ZeroBanner.php" );
 
-               $wgJsonConfigs['JsonZeroConfig']['isLocal'] = false;
-               $wgJsonConfigs['JsonZeroConfig']['remote'] = [
-                       'url' => 'https://zero.wikimedia.org/w/api.php',
-                       'username' => $wmgZeroPortalApiUserName,
-                       'password' => $wmgZeroPortalApiPassword,
-               ];
+               // HACK
+               $wgExtensionFunctions[] = function () {
+                       global $wgJsonConfigs, $wmgZeroPortalApiUserName, 
$wmgZeroPortalApiPassword;
+                       $wgJsonConfigs['JsonZeroConfig']['isLocal'] = false;
+                       $wgJsonConfigs['JsonZeroConfig']['remote'] = [
+                               'url' => 'https://zero.wikimedia.org/w/api.php',
+                               'username' => $wmgZeroPortalApiUserName,
+                               'password' => $wmgZeroPortalApiPassword,
+                       ];
+               };
 
                // @TODO: which group(s) on all wikies should Zero allow to 
flush cache?
                $wgGroupPermissions['sysop']['jsonconfig-flush'] = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd05c6ab8ffb70131bf82089be2ba263f1631774
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to