diff options
| author | rodneyrehm <rodneyrehm@localhost> | 2011-10-10 19:31:34 +0000 |
|---|---|---|
| committer | rodneyrehm <rodneyrehm@localhost> | 2011-10-10 19:31:34 +0000 |
| commit | 352cb05cf5a485cbb1d9ecfe08cb6734fe5a5d7c (patch) | |
| tree | 77343c27eef57a753c70df0dd096fcd6c8bf19b6 /demo | |
| parent | d3258767a61e65513a79b9f1337b73d564a57ea0 (diff) | |
| download | smarty-352cb05cf5a485cbb1d9ecfe08cb6734fe5a5d7c.tar.gz smarty-352cb05cf5a485cbb1d9ecfe08cb6734fe5a5d7c.tar.bz2 smarty-352cb05cf5a485cbb1d9ecfe08cb6734fe5a5d7c.zip | |
- bugfix Smarty_CacheResource_mysql example was missing strtotime() calls
Diffstat (limited to 'demo')
| -rw-r--r-- | demo/plugins/cacheresource.mysql.php | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |
