summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-10-15 20:01:47 -0400
committerJoey Hess <joey@gnu.kitenet.net>2009-10-15 20:01:47 -0400
commitfc1bad2e7b6922205ad079043fe3057b3628a2a8 (patch)
treedece816225de3764533d9d796efc84f7ce710e41 /IkiWiki/Plugin
parent31ec3a7570061e371e0011831308f88ff0887bb8 (diff)
slight optimisation
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/inline.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 553fd350c..a836c18f4 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -332,13 +332,13 @@ sub preprocess_inline (@) {
error sprintf(gettext("nonexistant template %s"), $params{template});
}
my $template=HTML::Template->new(@params) unless $raw;
+ my $needcontent=!($archive && $quick) && $template->query(name => 'content');
foreach my $page (@list) {
my $file = $pagesources{$page};
my $type = pagetype($file);
if (! $raw || ($raw && ! defined $type)) {
- if (!($archive && $quick) &&
- $template->query(name => 'content')) {
+ if ($needcontent) {
# Get the content before populating the
# template, since getting the content uses
# the same template if inlines are nested.