diff --git a/library/smarty/libs/sysplugins/smarty_resource_uncompiled.php b/library/smarty/libs/sysplugins/smarty_resource_uncompiled.php new file mode 100644 --- /dev/null +++ b/library/smarty/libs/sysplugins/smarty_resource_uncompiled.php @@ -0,0 +1,68 @@ +filepath = false; + $compiled->timestamp = false; + $compiled->exists = false; + } + + /** + * render compiled template code + * + * @param Smarty_Internal_Template $_template + * + * @return string + * @throws Exception + */ + public function render($_template) { + $level = ob_get_level(); + ob_start(); + try { + $this->renderUncompiled($_template->source, $_template); + return ob_get_clean(); + } catch (Exception $e) { + while (ob_get_level() > $level) { + ob_end_clean(); + } + throw $e; + } + } +}