diff options
author | Mario <mario@mariovavti.com> | 2021-03-26 20:54:48 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-26 20:54:48 +0100 |
commit | 725e57a27a41c8780c08fe598ec6c7b24a633cf4 (patch) | |
tree | 4839ee3a5f5102caeab6da4bb811d7fde2d5107f /Zotlabs/Render/SmartyTemplate.php | |
parent | b50f1657c3e5772dd6235ce98c55e71630b0c626 (diff) | |
download | volse-hubzilla-725e57a27a41c8780c08fe598ec6c7b24a633cf4.tar.gz volse-hubzilla-725e57a27a41c8780c08fe598ec6c7b24a633cf4.tar.bz2 volse-hubzilla-725e57a27a41c8780c08fe598ec6c7b24a633cf4.zip |
air: more work on UX during register
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 ""; } |