X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fblosxom.git;a=blobdiff_plain;f=blosxom.cgi;h=420a1b6e91ea9c7f4d600dcd240b0aa360cde077;hp=dca7e01e75476342c15b5110993249d62c695b47;hb=057ee9ef40098c4c4c67b3ab24e5a7cafa34e99a;hpb=05db44dead78cc33a8fdd2d168b0d3047de43f1b diff --git a/blosxom.cgi b/blosxom.cgi index dca7e01..420a1b6 100755 --- a/blosxom.cgi +++ b/blosxom.cgi @@ -553,9 +553,9 @@ $entries = sub { my $param_all = param('-all'); find( sub { - my $d; my $curr_depth = $File::Find::dir =~ tr[/][]; return if $depth and $curr_depth > $depth; + return if !-r $File::Find::name; if ( @@ -564,7 +564,7 @@ $entries = sub { =~ m!^$datadir/(?:(.*)/)?(.+)\.$file_extension$! # not an index, .file, and is readable - and $2 ne 'index' and $2 !~ /^\./ and ( -r $File::Find::name ) + and $2 ne 'index' and $2 !~ /^\./ ) { @@ -585,7 +585,7 @@ $entries = sub { or stat($static_file)->mtime < $mtime ) { $indexes{$1} = 1; - $d = join( '/', ( nice_date($mtime) )[ 5, 2, 3 ] ); + my $d = join( '/', ( nice_date($mtime) )[ 5, 2, 3 ] ); $indexes{$d} = $d; $indexes{ ( $1 ? "$1/" : '' ) . "$2.$file_extension" } = 1 if $static_entries; @@ -593,7 +593,7 @@ $entries = sub { } # not an entries match - elsif ( !-d $File::Find::name and -r $File::Find::name ) { + elsif ( !-d $File::Find::name ) { $others{$File::Find::name} = stat($File::Find::name)->mtime; } }, @@ -619,11 +619,7 @@ my ( $files, $indexes, $others ) = &$entries(); %indexes = %$indexes; # Static -if ( !$ENV{GATEWAY_INTERFACE} - and param('-password') - and $static_password - and param('-password') eq $static_password ) -{ +if ( $static_or_dynamic eq 'static' ) { param('-quiet') or print "Blosxom is generating static index pages...\n";