From a611b55d4c0a6b35a7f0a7997efa03ab7507d638 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 17 Sep 2002 15:38:34 +0000 Subject: [PATCH] suppressed an error-msg and try reading the template from the filesystem if it is not found in the db --- etemplate/inc/class.soetemplate.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.soetemplate.inc.php b/etemplate/inc/class.soetemplate.inc.php index 0329de16a8..2ed5887331 100644 --- a/etemplate/inc/class.soetemplate.inc.php +++ b/etemplate/inc/class.soetemplate.inc.php @@ -204,7 +204,7 @@ $this->db->query($sql,__LINE__,__FILE__); if (!$this->db->next_record()) { - return False; + return $this->readfile(); } $this->db2obj(); @@ -227,7 +227,7 @@ } $file .= '.xul'; - if ($this->name == '' || $app == '' || $name == '' || !is_readable($file) || !($f = fopen($file,'r'))) + if ($this->name == '' || $app == '' || $name == '' || !@file_exists($file) || !($f = @fopen($file,'r'))) { //echo "

Can't open '$file' !!!

\n"; return False;