Page MenuHomePhabricator

Fix $wgMathFullRestbaseURL so it doesn't require a $wgExtensionFunction to set
Open, Needs TriagePublic


Splitting from T286515#7235469.

At there's a hack that does:

	// 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'
			? ''  // T136205
			: "//$wgServerName/api/rest_";

AFAICT no other service needs this hack, why is Math special? Can it do it like everything else and not require the extension function?

Event Timeline

I don't know if we still need that. However, we are about to switch from restbase to the new mediawiki rest API. So if that can wait a bit^(TM) it will be resolved automatically.