%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;
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\..+$!!;