mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 09:43:30 +00:00
Use service 'GadgetsRepo' instead of deprecated GadgetRepo::singleton()
Change-Id: I226b259e361d3d27ec89975353fdf6396ba60ccb
This commit is contained in:
parent
1a2ccbb58c
commit
f6c3c98bc3
|
@ -17,7 +17,6 @@ use MediaWiki\Context\RequestContext;
|
|||
use MediaWiki\Extension\DiscussionTools\CommentParser;
|
||||
use MediaWiki\Extension\DiscussionTools\CommentUtils;
|
||||
use MediaWiki\Extension\DiscussionTools\ContentThreadItemSet;
|
||||
use MediaWiki\Extension\Gadgets\GadgetRepo;
|
||||
use MediaWiki\Linker\LinkTarget;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Output\OutputPage;
|
||||
|
@ -199,7 +198,7 @@ class HookUtils {
|
|||
|
||||
$extensionRegistry = ExtensionRegistry::getInstance();
|
||||
if ( $extensionRegistry->isLoaded( 'Gadgets' ) ) {
|
||||
$gadgetsRepo = GadgetRepo::singleton();
|
||||
$gadgetsRepo = MediaWikiServices::getInstance()->getService( 'GadgetsRepo' );
|
||||
$match = array_search( $gadgetName, $gadgetsRepo->getGadgetIds(), true );
|
||||
if ( $match !== false ) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue