From: Louis Date: Fri, 14 Nov 2014 13:59:37 +0000 (+0100) Subject: Corrected error: month pages were created even without calendar_autocreate config... X-Git-Tag: 3.20150107~77^2 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/473bcbe7a42a4168cab82ed12185817248de045f Corrected error: month pages were created even without calendar_autocreate config option --- diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index 9639f6d08..e732b025e 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -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});