From 9c983ca0f6a6c8bb096d29cfb8b21df0e951a19c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 25 Mar 2007 19:01:17 +0000 Subject: [PATCH] Fixed another problem where there would be DB function-not-found errors if the cache table wouldn't be enabled --- template_fs.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/template_fs.php b/template_fs.php index d573eee..147241c 100644 --- a/template_fs.php +++ b/template_fs.php @@ -167,7 +167,10 @@ class Template_FS extends Template else { $template = $this->_parse($this->_load($name)); - $db->query("INSERT INTO {$this->dbCacheTable} (filename, template, timestamp) VALUES ('$name', '" . $db->escape_string($template) . "', " . TIMENOW . ")"); + if ($this->dbCacheTable) + { + $db->query("INSERT INTO {$this->dbCacheTable} (filename, template, timestamp) VALUES ('$name', '" . $db->escape_string($template) . "', " . TIMENOW . ")"); + } } $this->cache["$name"] = $template; $this->usage["$name"] = 0; -- 2.43.5