From 8b4ab1fd43b592c18416c7d2509ab85d20f4fbe7 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Mon, 19 Dec 2022 21:34:02 +0100 Subject: [PATCH] Use LinkBatchFactory to create LinkBatch objects Bug: T325591 Change-Id: I3c529e62e45a38e6752f37b6bf36a1e727511e46 --- includes/CategoryTree.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/CategoryTree.php b/includes/CategoryTree.php index f6461ea6..01f3ca9a 100644 --- a/includes/CategoryTree.php +++ b/includes/CategoryTree.php @@ -30,7 +30,6 @@ use ExtensionRegistry; use FormatJson; use Html; use IContextSource; -use LinkBatch; use MediaWiki\Linker\LinkRenderer; use MediaWiki\MediaWikiServices; use OutputPage; @@ -463,7 +462,7 @@ class CategoryTree { ) && ExtensionRegistry::getInstance()->isLoaded( 'Translate' ); if ( $suppressTranslations ) { - $lb = new LinkBatch(); + $lb = MediaWikiServices::getInstance()->getLinkBatchFactory()->newLinkBatch(); foreach ( $res as $row ) { $title = Title::newFromText( $row->page_title, $row->page_namespace ); // Page name could have slashes, check the subpage for valid language built-in codes