projects
/
matthijs
/
upstream
/
blosxom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Avoid "conditional and" for setting the %f entries hash
[matthijs/upstream/blosxom.git]
/
blosxom.cgi
diff --git
a/blosxom.cgi
b/blosxom.cgi
index 1ee05fa378cf355818e158014307e3d33231c2e3..2875b44a6b8917df9f5c4789bf14c44d2a9523ef 100755
(executable)
--- a/
blosxom.cgi
+++ b/
blosxom.cgi
@@
-390,7
+390,9
@@
sub generate {
%files = %$files; %others = ref $others ? %$others : ();
# Plugins: Filter
%files = %$files; %others = ref $others ? %$others : ();
# Plugins: Filter
- foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('filter') and $entries = $plugin->filter(\%files, \%others) }
+ foreach my $plugin ( @plugins ) {
+ if ($plugins{$plugin} > 0 and $plugin->can('filter')){ $entries = $plugin->filter(\%files, \%others); }
+ }
my %f = %files;
my %f = %files;
@@
-451,7
+453,7
@@
sub generate {
if ( $currentdir =~ /(.*?)([^\/]+)\.(.+)$/ and $2 ne 'index' ) {
$currentdir = "$1$2.$file_extension";
if ( $currentdir =~ /(.*?)([^\/]+)\.(.+)$/ and $2 ne 'index' ) {
$currentdir = "$1$2.$file_extension";
-
$files{"$datadir/$1$2.$file_extension"} and %f = ( "$datadir/$1$2.$file_extension" => $files{"$datadir/$1$2.$file_extension"} )
;
+
%f = ( "$datadir/$currentdir" => $files{"$datadir/$currentdir"} ) if $files{"$datadir/$currentdir"}
;
}
else {
$currentdir =~ s!/index\..+$!!;
}
else {
$currentdir =~ s!/index\..+$!!;