master
Joey Hess 2007-12-09 00:05:07 -05:00
parent aa57c5ab5e
commit c8cb931890
2 changed files with 20 additions and 20 deletions

View File

@ -34,25 +34,6 @@ sub import { #{{{
hook(type => "preprocess", id => "calendar", call => \&preprocess);
} #}}}
sub needsbuild (@) { #{{{
my $needsbuild=shift;
foreach my $page (keys %pagestate) {
if (exists $pagestate{$page}{calendar}{nextchange}) {
if ($pagestate{$page}{calendar}{nextchange} <= $time) {
# force a rebuild so the calendar shows
# the current day
push @$needsbuild, $pagesources{$page};
}
if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
# remove state, will be re-added if
# the calendar is still there during the
# rebuild
delete $pagestate{$page}{calendar};
}
}
}
} # }}}
sub is_leap_year (@) { #{{{
my %params=@_;
return ($params{year} % 4 == 0 && (($params{year} % 100 != 0) || $params{year} % 400 == 0));
@ -400,4 +381,23 @@ sub preprocess (@) { #{{{
return "\n<div><div class=\"calendar\">$calendar</div></div>\n";
} #}}
sub needsbuild (@) { #{{{
my $needsbuild=shift;
foreach my $page (keys %pagestate) {
if (exists $pagestate{$page}{calendar}{nextchange}) {
if ($pagestate{$page}{calendar}{nextchange} <= $time) {
# force a rebuild so the calendar shows
# the current day
push @$needsbuild, $pagesources{$page};
}
if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
# remove state, will be re-added if
# the calendar is still there during the
# rebuild
delete $pagestate{$page}{calendar};
}
}
}
} # }}}
1

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-12-08 23:51-0500\n"
"POT-Creation-Date: 2007-12-09 00:04-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"