From 39864053db91c330500e8eb2a9d93775ca8035e7 Mon Sep 17 00:00:00 2001 From: Milan Date: Fri, 4 Oct 2019 00:30:09 +0200 Subject: [PATCH] remove compression from template --- lib/calcms/template.pm | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/lib/calcms/template.pm b/lib/calcms/template.pm index 03eabe9..39a49ed 100644 --- a/lib/calcms/template.pm +++ b/lib/calcms/template.pm @@ -211,24 +211,14 @@ sub check($;$$) { log::error( $config, 'invalid template!' ) if ( $template =~ /\.\./ ); } - #print STDERR $config->{cache}->{compress}."<.compres default:$template\n"; $template = ( split( /\//, $template ) )[-1]; my $cwd = Cwd::getcwd(); $template .= '.html' unless ( $template =~ /\./ ); - if ( ( $config->{cache}->{compress} eq '1' ) - && ( -e $cwd . '/templates/compressed/' . $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, "template not found: '$cwd/$template'" ) + unless -e $cwd . '/templates/' . $template; + $template = $cwd . '/templates/' . $template; - } - - log::error( $config, "missing permission to read template '$template'" ) - unless ( -r $template ); return $template; }