]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/calendar.pm
calendar: Add creation time limits to user's pagespec
[ikiwiki.git] / IkiWiki / Plugin / calendar.pm
index e3c5e2f2d4170a199bd25712b204a89eab224989..5aac958841793b3e92cf4b6fe2820c1aa8c4245e 100644 (file)
@@ -66,7 +66,8 @@ sub format_month (@) {
        my %params=@_;
 
        my %linkcache;
-       foreach my $p (pagespec_match_list($params{page}, $params{pages},
+       foreach my $p (pagespec_match_list($params{page}, 
+                               "creation_year($params{year}) and creation_month($params{month}) and ($params{pages})",
                                # add presence dependencies to update
                                # month calendar when pages are added/removed
                                deptype => deptype("presence"))) {
@@ -300,21 +301,16 @@ EOF
                my $tag;
                my $mtag=sprintf("%02d", $month);
                if ($month == $params{month}) {
-                       if ($pagesources{"$archivebase/$params{year}/$mtag"}) {
-                               $tag = 'this_month_link';
-                       }
-                       else {
-                               $tag = 'this_month_nolink';
-                       }
+                       $tag = 'year-calendar-this-month';
                }
                elsif ($pagesources{"$archivebase/$params{year}/$mtag"}) {
-                       $tag = 'month_link';
+                       $tag = 'year-calendar-month-link';
                } 
                elsif ($future_month && $month >= $future_month) {
-                       $tag = 'month_future';
+                       $tag = 'year-calendar-month-future';
                } 
                else {
-                       $tag = 'month_nolink';
+                       $tag = 'year-calendar-month-nolink';
                }
 
                if ($pagesources{"$archivebase/$params{year}/$mtag"}) {