summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2007-12-09 00:05:07 -0500
committerJoey Hess <joey@kitenet.net>2007-12-09 00:05:07 -0500
commitc8cb931890cb9ff614683eef27fc0bfeb308d8bd (patch)
treef62708653ad3305263b519139f457bbb87335c87 /IkiWiki/Plugin
parentaa57c5ab5e024f783b7935f36b00c3c1a8e9e5f1 (diff)
reorg
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/calendar.pm38
1 files changed, 19 insertions, 19 deletions
diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm
index 0bb0e81fd..4bb4c2c21 100644
--- a/IkiWiki/Plugin/calendar.pm
+++ b/IkiWiki/Plugin/calendar.pm
@@ -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