From 8093af612806e36f1c1a4e82583365f4f8b33410 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 11 Jan 2006 06:33:48 +0000 Subject: [PATCH] Do the checks for template existence in a batch --- includes/EditPage.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/EditPage.php b/includes/EditPage.php index c174a28413..fbb89a8963 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -997,6 +997,14 @@ END $outText = ''; $templates = $this->mArticle->getUsedTemplates(); if ( count( $templates ) > 0 ) { + # Do a batch existence check + $batch = new LinkBatch; + foreach( $templates as $title ) { + $batch->addObj( $title ); + } + $batch->execute(); + + # Construct the HTML $outText = '
'. wfMsg( 'templatesused' ) . '