mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-23 15:56:55 +00:00
Avoid use of deprecated wfGetUrlUtils
Change-Id: Ia36e0cf4a390f32fad7da55a503ac15afa85317a
This commit is contained in:
parent
484338c20d
commit
27136f2afa
|
@ -214,16 +214,20 @@ class SiteLibrary extends LibraryBase {
|
|||
// Not expensive because we can have a max of three cache misses in the
|
||||
// entire page parse.
|
||||
$interwikiMap = [];
|
||||
$lookup = MediaWikiServices::getInstance()->getInterwikiLookup();
|
||||
|
||||
$services = MediaWikiServices::getInstance();
|
||||
$lookup = $services->getInterwikiLookup();
|
||||
$config = $services->getMainConfig();
|
||||
$urlUtils = $services->getUrlUtils();
|
||||
|
||||
$prefixes = $lookup->getAllPrefixes( $local );
|
||||
$config = MediaWikiServices::getInstance()->getMainConfig();
|
||||
$localInterwikis = $config->get( MainConfigNames::LocalInterwikis );
|
||||
$extraInterlanguageLinkPrefixes = $config->get( MainConfigNames::ExtraInterlanguageLinkPrefixes );
|
||||
foreach ( $prefixes as $row ) {
|
||||
$prefix = $row['iw_prefix'];
|
||||
$val = [
|
||||
'prefix' => $prefix,
|
||||
'url' => wfGetUrlUtils()->expand( $row['iw_url'], PROTO_RELATIVE ) ?? false,
|
||||
'url' => $urlUtils->expand( $row['iw_url'], PROTO_RELATIVE ) ?? false,
|
||||
'isProtocolRelative' => substr( $row['iw_url'], 0, 2 ) === '//',
|
||||
'isLocal' => isset( $row['iw_local'] ) && $row['iw_local'] == '1',
|
||||
'isTranscludable' => isset( $row['iw_trans'] ) && $row['iw_trans'] == '1',
|
||||
|
|
Loading…
Reference in a new issue