Replace deprecated Hooks::register

Bug: T335536
Change-Id: Ia39bbc8a2f0853ae69f966b65ff47551f3af941d
This commit is contained in:
Umherirrender 2023-05-06 23:05:11 +02:00
parent 827abe8b85
commit d5ecaf0796

View file

@ -2,7 +2,6 @@
namespace MediaWiki\Extension\Interwiki;
use Hooks as MWHooks;
use MediaWiki\MediaWikiServices;
use MediaWiki\WikiMap\WikiMap;
@ -41,7 +40,7 @@ class Hooks {
return;
}
// This will trigger a deprecation warning in MW 1.36+
MWHooks::register(
MediaWikiServices::getInstance()->getHookContainer()->register(
'InterwikiLoadPrefix', 'MediaWiki\Extension\Interwiki\Hooks::onInterwikiLoadPrefix'
);
}