Avoid use of deprecated wfGetUrlUtils

Change-Id: Ica961fd161898292f0bfe33c1980329ca548c680
This commit is contained in:
Ebrahim Byagowi 2024-09-08 09:54:52 +03:30
parent 076f27a0fc
commit 4330014577

View file

@ -377,6 +377,7 @@ class Hooks implements
public function onCustomEditor( $article, $user ) {
$req = $article->getContext()->getRequest();
$services = MediaWikiServices::getInstance();
$urlUtils = $services->getUrlUtils();
$veConfig = $services->getConfigFactory()->makeConfig( 'visualeditor' );
if ( ExtensionRegistry::getInstance()->isLoaded( 'MobileFrontend' ) ) {
@ -409,7 +410,7 @@ class Hooks implements
$out = $article->getContext()->getOutput();
$titleMsg = $title->exists() ? 'editing' : 'creating';
$out->setPageTitleMsg( wfMessage( $titleMsg, $title->getPrefixedText() ) );
$out->showPendingTakeover( $url, 'visualeditor-toload', wfGetUrlUtils()->expand( $url ) );
$out->showPendingTakeover( $url, 'visualeditor-toload', $urlUtils->expand( $url ) );
$out->setRevisionId( $req->getInt( 'oldid', $article->getRevIdFetched() ) );
return false;