if ($params{feedshow} && $num < $params{feedshow}) {
$num=$params{feedshow};
}
- if ($params{skip}) {
+ if ($params{skip} && $num) {
$num+=$params{skip};
}
filter => sub { $_[0] eq $params{page} },
sort => exists $params{sort} ? $params{sort} : "age",
reverse => yesno($params{reverse}),
- num => $num,
+ ($num ? (num => $num) : ()),
);
}
foreach my $page (@list) {
my $file = $pagesources{$page};
my $type = pagetype($file);
- if (! $raw || ($raw && ! defined $type)) {
+ if (! $raw) {
if ($needcontent) {
# Get the content before populating the
# template, since getting the content uses
filter($page, $params{destpage},
readfile(srcfile($file)))));
}
+ else {
+ $ret.="\n".
+ readfile(srcfile($file));
+ }
}
}
}