X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTemplatesOnThisPageFormatter.php;h=215e4ec8136bc53c92effaf963148779318f7dc4;hb=4dfae3bcc7fe19df97cfc5e53838fa95297d512c;hp=494c7bfc86cbdedeeaac809e2fa5a758b4c8ad19;hpb=a6c5f1a81599bc24005554f330f56d7a1b054d4b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/TemplatesOnThisPageFormatter.php b/includes/TemplatesOnThisPageFormatter.php index 494c7bfc86..215e4ec813 100644 --- a/includes/TemplatesOnThisPageFormatter.php +++ b/includes/TemplatesOnThisPageFormatter.php @@ -20,6 +20,7 @@ use MediaWiki\Linker\LinkRenderer; use MediaWiki\Linker\LinkTarget; +use MediaWiki\MediaWikiServices; /** * Handles formatting for the "templates used on this page" @@ -66,11 +67,7 @@ class TemplatesOnThisPageFormatter { } # Do a batch existence check - $batch = new LinkBatch; - foreach ( $templates as $title ) { - $batch->addObj( $title ); - } - $batch->execute(); + ( new LinkBatch( $templates ) )->execute(); # Construct the HTML $outText = '