remove compression from template
This commit is contained in:
@@ -211,24 +211,14 @@ sub check($;$$) {
|
|||||||
log::error( $config, 'invalid template!' ) if ( $template =~ /\.\./ );
|
log::error( $config, 'invalid template!' ) if ( $template =~ /\.\./ );
|
||||||
}
|
}
|
||||||
|
|
||||||
#print STDERR $config->{cache}->{compress}."<.compres default:$template\n";
|
|
||||||
$template = ( split( /\//, $template ) )[-1];
|
$template = ( split( /\//, $template ) )[-1];
|
||||||
my $cwd = Cwd::getcwd();
|
my $cwd = Cwd::getcwd();
|
||||||
|
|
||||||
$template .= '.html' unless ( $template =~ /\./ );
|
$template .= '.html' unless ( $template =~ /\./ );
|
||||||
if ( ( $config->{cache}->{compress} eq '1' )
|
log::error( $config, "template not found: '$cwd/$template'" )
|
||||||
&& ( -e $cwd . '/templates/compressed/' . $template ) )
|
unless -e $cwd . '/templates/' . $template;
|
||||||
{
|
$template = $cwd . '/templates/' . $template;
|
||||||
$template = $cwd . '/templates/compressed/' . $template;
|
|
||||||
} elsif ( -e $cwd . '/templates/' . $template ) {
|
|
||||||
$template = $cwd . '/templates/' . $template;
|
|
||||||
} else {
|
|
||||||
log::error( $config, "template not found: '$cwd/$template'" );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
log::error( $config, "missing permission to read template '$template'" )
|
|
||||||
unless ( -r $template );
|
|
||||||
return $template;
|
return $template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user