diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-23 16:47:19 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-23 16:47:19 -0400 |
commit | 0cc2a36f593fd14b6345ad2c0b446edb2bafbe2e (patch) | |
tree | c85d5927464b7f322e74f88fdb58af635df8dbb1 /IkiWiki.pm | |
parent | 9f301569496e7d4019f41c34be5f07b828952ba8 (diff) | |
download | ikiwiki-0cc2a36f593fd14b6345ad2c0b446edb2bafbe2e.tar ikiwiki-0cc2a36f593fd14b6345ad2c0b446edb2bafbe2e.tar.gz |
bugfix
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 1fa89586e..08a3d7875 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2608,11 +2608,12 @@ sub match_created_after ($$;@) { } sub match_creation_day ($$;@) { + my $page=shift; my $d=shift; if ($d !~ /^\d+$/) { return IkiWiki::ErrorReason->new("invalid day $d"); } - if ((localtime($IkiWiki::pagectime{shift()}))[3] == shift) { + if ((localtime($IkiWiki::pagectime{$page}))[3] == $d) { return IkiWiki::SuccessReason->new('creation_day matched'); } else { @@ -2621,11 +2622,12 @@ sub match_creation_day ($$;@) { } sub match_creation_month ($$;@) { + my $page=shift; my $m=shift; if ($m !~ /^\d+$/) { return IkiWiki::ErrorReason->new("invalid month $m"); } - if ((localtime($IkiWiki::pagectime{shift()}))[4] + 1 == shift) { + if ((localtime($IkiWiki::pagectime{$page}))[4] + 1 == $m) { return IkiWiki::SuccessReason->new('creation_month matched'); } else { @@ -2634,11 +2636,12 @@ sub match_creation_month ($$;@) { } sub match_creation_year ($$;@) { + my $page=shift; my $y=shift; if ($y !~ /^\d+$/) { return IkiWiki::ErrorReason->new("invalid year $y"); } - if ((localtime($IkiWiki::pagectime{shift()}))[5] + 1900 == $y) { + if ((localtime($IkiWiki::pagectime{$page}))[5] + 1900 == $y) { return IkiWiki::SuccessReason->new('creation_year matched'); } else { |