mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-30 11:06:55 +00:00
Use LinkBatchFactory to create LinkBatch objects
Bug: T325591 Change-Id: I3c529e62e45a38e6752f37b6bf36a1e727511e46
This commit is contained in:
parent
0a9fcee1b6
commit
8b4ab1fd43
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue