mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-23 15:16:56 +00:00
Remove additional v1 suffix when computing internalRestbaseURL
Remove additional /v1 when computing internalRestbaseURL from
virtualRestConfig as this will be added in getUrl in MathRestbaseInterface.
internalRestbaseURL was introduced in I2fbc441955a1fe417f264f31f3729ce0715f7f16.
Bug: T334842
Bug: T338381
Change-Id: If2719fb9106e1414ce8814a2fbafa5dcedb84e39
(cherry picked from commit 7c7b3324be
)
This commit is contained in:
parent
3263379318
commit
4dec9419f1
|
@ -72,7 +72,7 @@ class Hooks {
|
|||
$restBaseDomain
|
||||
);
|
||||
|
||||
$internalRestbaseURL = "$restBaseUrl/$restBaseDomain/v1/";
|
||||
$internalRestbaseURL = "$restBaseUrl/$restBaseDomain/";
|
||||
} else {
|
||||
// Default to using the external URL for internal calls as well.
|
||||
$internalRestbaseURL = $fullRestbaseUrl;
|
||||
|
|
|
@ -73,7 +73,7 @@ class HooksTest extends MediaWikiUnitTestCase {
|
|||
] + $defaults,
|
||||
[
|
||||
'MathFullRestbaseURL' => 'https://wikimedia.org/api/rest_',
|
||||
'MathInternalRestbaseURL' => 'https://restbase.internal/rest/mywiki.test/v1/',
|
||||
'MathInternalRestbaseURL' => 'https://restbase.internal/rest/mywiki.test/',
|
||||
]
|
||||
];
|
||||
|
||||
|
@ -86,7 +86,7 @@ class HooksTest extends MediaWikiUnitTestCase {
|
|||
] + $defaults,
|
||||
[
|
||||
'MathFullRestbaseURL' => 'https://wikimedia.org/api/rest_',
|
||||
'MathInternalRestbaseURL' => 'https://restbase.internal/rest/mywiki.test/v1/',
|
||||
'MathInternalRestbaseURL' => 'https://restbase.internal/rest/mywiki.test/',
|
||||
]
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue