diff options
Diffstat (limited to 'Zotlabs/Render/SmartyTemplate.php')
-rw-r--r-- | Zotlabs/Render/SmartyTemplate.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Zotlabs/Render/SmartyTemplate.php b/Zotlabs/Render/SmartyTemplate.php index 61fb72f8a..2cb96521b 100644 --- a/Zotlabs/Render/SmartyTemplate.php +++ b/Zotlabs/Render/SmartyTemplate.php @@ -8,16 +8,16 @@ use App; class SmartyTemplate implements TemplateEngine { static $name ="smarty3"; - + public function __construct() { // Cannot use get_config() here because it is called during installation when there is no DB. // FIXME: this may leak private information such as system pathnames. - $basecompiledir = ((array_key_exists('smarty3_folder', App::$config['system'])) + $basecompiledir = ((array_key_exists('smarty3_folder', App::$config['system'])) ? App::$config['system']['smarty3_folder'] : ''); if (! $basecompiledir) { - $basecompiledir = str_replace('Zotlabs','',dirname(__dir__)) . "/" . TEMPLATE_BUILD_PATH; + $basecompiledir = str_replace('Zotlabs','',dirname(__dir__)) . TEMPLATE_BUILD_PATH; } if (! is_dir($basecompiledir)) { @os_mkdir(TEMPLATE_BUILD_PATH, STORAGE_DEFAULT_PERMISSIONS, true); @@ -30,7 +30,7 @@ class SmartyTemplate implements TemplateEngine { } App::$config['system']['smarty3_folder'] = $basecompiledir; } - + // TemplateEngine interface public function replace_macros($s, $r) { @@ -52,9 +52,9 @@ class SmartyTemplate implements TemplateEngine { } $s->assign($key, $value); } - return $s->parsed($template); + return $s->parsed($template); } - + public function get_markup_template($file, $root = '') { $template_file = theme_include($file, $root); if ($template_file) { @@ -62,7 +62,7 @@ class SmartyTemplate implements TemplateEngine { $template->filename = $template_file; return $template; - } + } return EMPTY_STR; } @@ -84,7 +84,7 @@ class SmartyTemplate implements TemplateEngine { $template = new SmartyInterface(); $template->filename = $template_file; return $template; - } + } return ""; } |