From d6d774e04beebec5d692fd1f694300ee33bfecc6 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sat, 18 Oct 2008 01:57:53 +0000 Subject: [PATCH] Commit for the hell of it. git-svn-id: http://svn.cleancode.org/svn/pickles@78 4d10bc64-7434-11dc-a737-d2d0f8310089 --- classes/Controller.php | 0 classes/Viewer/PHP.php | 4 ++++ classes/Viewer/Smarty.php | 10 ++++++---- 3 files changed, 10 insertions(+), 4 deletions(-) mode change 100755 => 100644 classes/Controller.php diff --git a/classes/Controller.php b/classes/Controller.php old mode 100755 new mode 100644 diff --git a/classes/Viewer/PHP.php b/classes/Viewer/PHP.php index cd41bd4..2f461c9 100644 --- a/classes/Viewer/PHP.php +++ b/classes/Viewer/PHP.php @@ -47,6 +47,10 @@ class Viewer_PHP extends Viewer_Common { $this->template = SITE_PATH . '../templates/' . $this->model_name . '.php'; $this->shared_template = PICKLES_PATH . 'templates/' . $this->shared_name . '.php'; + //if (filemtime($this->template)) { + // readfile('/var/www/josh/pickles/var/joshtronic.localhost/smarty/cache/home.html'); + //} + /** * @todo There's a bug with the store home page since it's a redirect, maybe */ diff --git a/classes/Viewer/Smarty.php b/classes/Viewer/Smarty.php index 45802b1..ee8b91e 100644 --- a/classes/Viewer/Smarty.php +++ b/classes/Viewer/Smarty.php @@ -56,9 +56,11 @@ class Viewer_Smarty extends Viewer_Common { * @todo move this to the config */ // Enables caching - //$smarty->caching = 1; - //$smarty->compile_check = true; - //$smarty->cache_lifetime = 3600; + $smarty->caching = 1; + $smarty->compile_check = true; + $smarty->cache_lifetime = 3600; + + var_dump($smarty->is_cached('index.tpl', $this->model_name)); // Loads the trim whitespace filter $smarty->load_filter('output','trimwhitespace'); @@ -133,7 +135,7 @@ class Viewer_Smarty extends Viewer_Common { * template to determine whether or not the index should be loaded? */ if ($smarty->template_exists('index.tpl')) { - $smarty->display('index.tpl'); + $smarty->display('index.tpl', $this->model_name); } else { $smarty->display($template);