markunseen($feed->{sourcepage});
}
}
+
+ return $needsbuild;
}
sub preprocess (@) {
my $timestamp=undef;
foreach my $feed (keys %feeds) {
- if (defined $feeds{$feed}->{lastupdate}) {
- my $t=$feeds{$feed}->{lastupdate}+$feeds{$feed}->{updateinterval};
- if (! defined $timestamp || $timestamp > $t) {
- $timestamp=$t;
- }
- }
- else {
- $timestamp=0;
+ my $t=$feeds{$feed}->{lastupdate}+$feeds{$feed}->{updateinterval};
+ if (! defined $timestamp || $timestamp > $t) {
+ $timestamp=$t;
}
}
$newfile=~s/\.new$/time/;
$guid->{md5}=$digest;
# Create the page.
- my $template=template($feed->{template}, blind_cache => 1);
+ my $template;
+ eval {
+ $template=template($feed->{template}, blind_cache => 1);
+ };
+ if ($@) {
+ print STDERR gettext("failed to process template:")." $@";
+ return;
+ }
$template->param(title => $params{title})
if defined $params{title} && length($params{title});
$template->param(content => wikiescape(htmlabs($params{content},