$num+=$params{skip};
}
- @list = use_pagespec($params{page}, $params{pages},
+ @list = pagespec_match_list($params{page}, $params{pages},
deptype => deptype($quick ? "presence" : "content"),
- limit => sub { $_[0] ne $params{page} },
+ filter => sub { $_[0] eq $params{page} },
sort => exists $params{sort} ? $params{sort} : "age",
reverse => yesno($params{reverse}),
num => $num,
}
if ($feeds && exists $params{feedpages}) {
- @feedlist = use_pagespec($params{page}, $params{feedpages},
- list => \@feedlist);
+ @feedlist = pagespec_match_list(
+ $params{page}, "($params{pages}) and ($params{feedpages})",
+ deptype => deptype($quick ? "presence" : "content"),
+ list => \@feedlist,
+ );
}
my ($feedbase, $feednum);
error sprintf(gettext("nonexistant template %s"), $params{template});
}
my $template=HTML::Template->new(@params) unless $raw;
+ my $needcontent=$raw || (!($archive && $quick) && $template->query(name => 'content'));
foreach my $page (@list) {
my $file = $pagesources{$page};
my $type = pagetype($file);
if (! $raw || ($raw && ! defined $type)) {
- unless ($archive && $quick) {
+ if ($needcontent) {
# Get the content before populating the
# template, since getting the content uses
# the same template if inlines are nested.