]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Corrected error: month pages were created even without calendar_autocreate config option
authorLouis <spalax@gresille.org>
Fri, 14 Nov 2014 13:59:37 +0000 (14:59 +0100)
committerLouis <spalax@gresille.org>
Fri, 14 Nov 2014 13:59:58 +0000 (14:59 +0100)
IkiWiki/Plugin/calendar.pm

index 9639f6d08ea360fcf0d1865bb8277beb69dfb167..e732b025ee0547b2f997758cb1cacffe0353cc09 100644 (file)
@@ -171,8 +171,6 @@ sub gencalendaryear {
        my $year = shift;
        my %params = @_;
 
-       return unless $config{calendar_autocreate};
-
        # Building year page
        my $page = calendarlink($year);
        my $pagefile = newpagefile($page, $config{default_pageext});
@@ -713,6 +711,8 @@ sub scan (@) {
        my %params=@_;
        my $page=$params{page};
 
+       return unless $config{calendar_autocreate};
+
        # Check if year pages have to be generated
        if (pagespec_match($page, $config{archive_pagespec})) {
                my @ctime = localtime($IkiWiki::pagectime{$page});