From a916065e9d0b7b9f6193df237b13c7af9de45564 Mon Sep 17 00:00:00 2001 From: Chris Schuld Date: Mon, 15 Jul 2013 15:28:40 -0700 Subject: [PATCH 1/2] static member using 'this', mirrored other set(s) --- Views/Smarty.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Views/Smarty.php b/Views/Smarty.php index 38f9f26..43e9dc6 100644 --- a/Views/Smarty.php +++ b/Views/Smarty.php @@ -107,7 +107,9 @@ public static function getInstance() } require_once self::$smartyDirectory . '/Smarty.class.php'; self::$smartyInstance = new \Smarty(); - self::$smartyInstance->template_dir = is_null(self::$smartyTemplatesDirectory) ? $this->getTemplatesDirectory() : self::$smartyTemplatesDirectory; + if (self::$smartyTemplatesDirectory) { + self::$smartyInstance->template_dir = self::$smartyTemplatesDirectory; + } if (self::$smartyExtensions) { self::$smartyInstance->addPluginsDir(self::$smartyExtensions); } From fea177da670222967d7c31483249836bec822dc1 Mon Sep 17 00:00:00 2001 From: Chris Schuld Date: Mon, 15 Jul 2013 15:30:38 -0700 Subject: [PATCH 2/2] using all() from Set helper --- Views/Smarty.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Views/Smarty.php b/Views/Smarty.php index 43e9dc6..5f47547 100644 --- a/Views/Smarty.php +++ b/Views/Smarty.php @@ -88,7 +88,7 @@ class Smarty extends \Slim\View public function render($template) { $instance = self::getInstance(); - $instance->assign($this->data); + $instance->assign($this->data->all()); return $instance->fetch($template); }