OSDN Git Service

renderer: smarty 3 renderer default setting, error handling
authorSotaro KARASAWA <sotaro.k@gmail.com>
Fri, 7 Jan 2011 13:19:09 +0000 (13:19 +0000)
committerSotaro KARASAWA <sotaro.k@gmail.com>
Fri, 7 Jan 2011 13:19:09 +0000 (13:19 +0000)
class/Renderer/Smarty3.php

index 9e5c7b4..e894202 100644 (file)
@@ -61,6 +61,7 @@ class Ethna_Renderer_Smarty3 extends Ethna_Renderer
             Ethna_Util::mkdir($this->engine->compile_dir, 0755);
         }
 
+        $this->engine->inheritance = true;
         $this->engine->plugins_dir = array_merge(
             $controller->getDirectory('plugins'),
             array(ETHNA_BASE . '/class/Plugin/Smarty', SMARTY_DIR . 'plugins')
@@ -98,8 +99,7 @@ class Ethna_Renderer_Smarty3 extends Ethna_Renderer
                 return Ethna::raiseWarning('template not found ' . $this->template);
             }
         } catch (SmartyCompilerException $e) {
-            $this->logger->log(LOG_ERR, "smarty compile error: msg='{$e->getMessage()}'");
-            return Ethna::raiseError("smarty compile error: msg='{$e->getMessage()}'", 500);
+            return Ethna::raiseWarning("smarty compile error: msg='{$e->getMessage()}'", 500);
         }
     }