Replace use of deprecated global URL functions with wfGetUrlUtils()

This is a quick fix rather than the proper DI fix.

Bug: T319340
Change-Id: I9e3bd0049b28efc634e1f394a487f86e27ef9e0d
This commit is contained in:
James D. Forrester 2024-08-29 13:35:09 -04:00
parent 40ebea2313
commit bb71303a81

View file

@ -223,7 +223,7 @@ class SiteLibrary extends LibraryBase {
$prefix = $row['iw_prefix'];
$val = [
'prefix' => $prefix,
'url' => wfExpandUrl( $row['iw_url'], PROTO_RELATIVE ),
'url' => wfGetUrlUtils()->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',