Fixed another problem where there would be DB function-not-found errors if the cache table wouldn't be enabled

Robert Sesek [2007-03-25 19:01]
Fixed another problem where there would be DB function-not-found errors if the cache table wouldn't be enabled
Filename
template_fs.php
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;