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\..+$!!;
my $date = (&$template($path,'date',$flavour));
# Plugins: Date
- foreach my $plugin ( @plugins ) { $plugins{$plugin} > 0 and $plugin->can('date') and $entries = $plugin->date($currentdir, \$date, $files{$path_file}, $dw,$mo,$mo_num,$da,$ti,$yr) }
+ foreach my $plugin (@plugins) {
+ if ( $plugins{$plugin} > 0 and $plugin->can('date') ) {
+ $entries
+ = $plugin->date( $currentdir, \$date, $files{$path_file}, $dw,
+ $mo, $mo_num, $da, $ti, $yr );
+ }
+ }
$date = &$interpolate($date);
- $curdate ne $date and $curdate = $date and $output .= $date;
+ if ( $date && $curdate ne $date ) {
+ $curdate = $date;
+ $output .= $date;
+ }
use vars qw/ $title $body $raw /;
if (-f "$path_file" && $fh->open("< $path_file")) {