Split parser related files to have one class in one file
[lhc/web/wiklou.git] / includes / TemplatesOnThisPageFormatter.php
index c0ae374..bca1ef6 100644 (file)
@@ -66,11 +66,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 = '<div class="mw-templatesUsedExplanation">';
@@ -93,11 +89,11 @@ class TemplatesOnThisPageFormatter {
                }
 
                if ( $more instanceof LinkTarget ) {
-                       $outText .= Html::rawElement( 'li', $this->linkRenderer->makeLink(
+                       $outText .= Html::rawElement( 'li', [], $this->linkRenderer->makeLink(
                                $more, $this->context->msg( 'moredotdotdot' )->text() ) );
                } elseif ( $more ) {
                        // Documented as should already be escaped
-                       $outText .= Html::rawElement( 'li', $more );
+                       $outText .= Html::rawElement( 'li', [], $more );
                }
 
                $outText .= '</ul>';