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

Change subject: Set $wgMathFullRestbaseURL so that MathML works even if VE is 
disabled
......................................................................


Set $wgMathFullRestbaseURL so that MathML works even if VE is disabled

As $wgMathFullRestbaseURL is currently not set on Wikimedia wikis,
MathRestbaseInterface::getUrl() currently fallbacks to use RESTBase url from
$wgVisualEditorFullRestbaseURL. But VE is disabled on 'wikisource' wikis
so it doesn't work there.

This config was adapted from the block where $wgVisualEditorFullRestbaseURL is 
set.

Bug: T122401
Change-Id: I746f8558ccee484f8759cf9cea195cf06e472d49
---
M wmf-config/CommonSettings.php
1 file changed, 11 insertions(+), 0 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  Physikerwelt: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 7506afe..3331faa 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2194,6 +2194,17 @@
        // Prevent accidental use.
        $wgMathLaTeXMLUrl = null;
        $wgMathMathMLUrl = "http://mathoid.svc.eqiad.wmnet:10042";;
+
+       // Set up $wgMathFullRestbaseURL - similar to VE RESTBase config above
+       // HACK: $wgServerName is not available yet at this point, it's set by 
Setup.php
+       // so use a hook
+       $wgExtensionFunctions[] = function () {
+               global $wgServerName, $wgMathFullRestbaseURL, $wmfRealm;
+
+               $wgMathFullRestbaseURL = $wmfRealm === 'production'
+                       ? "https://$wgServerName/api/rest_";
+                       : "//$wgServerName/api/rest_";
+       };
 }
 
 if ( $wmgUseBabel ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I746f8558ccee484f8759cf9cea195cf06e472d49
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Glaisher <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to