From c8cb931890cb9ff614683eef27fc0bfeb308d8bd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 9 Dec 2007 00:05:07 -0500 Subject: reorg --- IkiWiki/Plugin/calendar.pm | 38 +++++++++++++++++++------------------- po/ikiwiki.pot | 2 +- 2 files changed, 20 insertions(+), 20 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
$calendar
\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 diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index bd6afd4d4..d18fb612a 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -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 \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3