Glaisher has uploaded a new change for review.
https://gerrit.wikimedia.org/r/261321
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, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/21/261321/1
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 7506afe..34a4e9e 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2194,6 +2194,18 @@
// Prevent accidental use.
$wgMathLaTeXMLUrl = null;
$wgMathMathMLUrl = "http://mathoid.svc.eqiad.wmnet:10042";
+
+ // 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: newchange
Gerrit-Change-Id: I746f8558ccee484f8759cf9cea195cf06e472d49
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits