dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88832ab
)
Do the checks for template existence in a batch
author
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 11 Jan 2006 06:33:48 +0000
(06:33 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Wed, 11 Jan 2006 06:33:48 +0000
(06:33 +0000)
includes/EditPage.php
patch
|
blob
|
history
diff --git
a/includes/EditPage.php
b/includes/EditPage.php
index
c174a28
..
fbb89a8
100644
(file)
--- 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 = '<br />'. wfMsg( 'templatesused' ) . '<ul>';
foreach ( $templates as $titleObj ) {
$outText .= '<li>' . $sk->makeLinkObj( $titleObj ) . '</li>';