From d225fb428c333935e36c72c4e175b42a5d98999d Mon Sep 17 00:00:00 2001 From: Len Kranendonk Date: Fri, 13 Aug 2004 08:35:13 +0000 Subject: [PATCH] More efficient file exists check --- lib/WebGUI/Template.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/WebGUI/Template.pm b/lib/WebGUI/Template.pm index 65f10c29a..2c50d31ee 100644 --- a/lib/WebGUI/Template.pm +++ b/lib/WebGUI/Template.pm @@ -231,10 +231,10 @@ sub process { unless (-f $file->getPath) { ($template) = WebGUI::SQL->quickArray("select template from template where templateId=".$templateId." and namespace=".quote($namespace),WebGUI::SQL->getSlave); $file->saveFromScalar($template); - } - unless (-f $file->getPath) { - WebGUI::ErrorHandler::warn("Could not create file ".$file->getPath."\nTemplate file caching is disabled"); - $params{scalarref} = \$template; + unless (-f $file->getPath) { + WebGUI::ErrorHandler::warn("Could not create file ".$file->getPath."\nTemplate file caching is disabled"); + $params{scalarref} = \$template; + } } return _execute(\%params,$vars); }