diff --git a/change_log.txt b/change_log.txt index bf6e4bc2..1b090914 100644 --- a/change_log.txt +++ b/change_log.txt @@ -2,6 +2,7 @@ 10.10.2011 - bugfix variable name typo in {html_options} and {html_checkboxes} (Issue #54) - bugfix tag did create wrong output when caching enabled and the tag was in included subtemplate +- bugfix Smarty_CacheResource_mysql example was missing strtotime() calls ===== Smarty-3.1.3 ===== 07.10.2011 diff --git a/demo/plugins/cacheresource.mysql.php b/demo/plugins/cacheresource.mysql.php index 03455c80..ab8c4751 100644 --- a/demo/plugins/cacheresource.mysql.php +++ b/demo/plugins/cacheresource.mysql.php @@ -61,7 +61,7 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom { $this->fetch->closeCursor(); if ($row) { $content = $row['content']; - $mtime = $row['modified']; + $mtime = strtotime($row['modified']); } else { $content = null; $mtime = null; @@ -81,7 +81,7 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom { protected function fetchTimestamp($id, $name, $cache_id, $compile_id) { $this->fetchTimestamp->execute(array('id' => $id)); - $mtime = $this->fetchTimestamp->fetchColumn(); + $mtime = strtotime($this->fetchTimestamp->fetchColumn()); $this->fetchTimestamp->closeCursor(); return $mtime; }