X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom-plugins.git;a=blobdiff_plain;f=general%2Fentries_cache;h=1d8b2876ee5f0043635fbbac8abb7a8fa0760918;hp=ff8e6a1007a927da0aa81a8dbfb77df5d4754cce;hb=ae25619b17e8e60f1865107bfdbb8b290ffa9097;hpb=f7f05b76b20ac903f837c317c2cda880aaa5f725 diff --git a/general/entries_cache b/general/entries_cache index ff8e6a1..1d8b287 100644 --- a/general/entries_cache +++ b/general/entries_cache @@ -1,7 +1,7 @@ # Blosxom Plugin: entries_cache -*- perl -*- # Author(s): Fletcher T. Penney # Modified by Steve Schwarz -# Version: 0.92 +# Version: 0.93 # Based on entries_index by Rael Dornfest # Documentation help contributed by Iain Cheyne @@ -71,6 +71,10 @@ $update_static_rendering = 0 unless defined $update_static_rendering; # even when stories are edited afterwards (Fletcher Penney's default). # Set to 1 if you want to be able to fix typos in statically rendered stories. +$index_umask = oct(007) unless defined $index_umask; + # Mask for index files : default allows Read/Write for owner and group, + # nothing for others. + $debug = 0 unless defined $debug; # Debugging flag @@ -204,6 +208,7 @@ sub entries { if ( $reindex ) { # The index was recreated, so we should record the new version + my $savemask = umask $index_umask ; if ( open ENTRIES, "> $indexname" ) { foreach (sort keys %files) { print ENTRIES "$_=>$files{$_}\n"; @@ -221,6 +226,8 @@ sub entries { } else { warn "couldn't > $others_indexname: $!\n"; } + umask $savemask ; + } } return (\%files, \%indexes, \%others); @@ -451,9 +458,12 @@ large number of files to be indexed. =head1 VERSION -0.92 +0.93 =head1 VERSION HISTORY +0.93 Added the $update_static_rendering and $index_umask + configuration variables. + 0.92 Checks if meta-creation_date is in the future and only displays entry if $show_future_entries is set. Otherwise future articles (by meta-creation_date or file modified time) are not displayed.