X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FRender%2FFriendicaSmartyEngine.php;h=5d7ed6c0c94dbb353e01f07c8d16925c5543421c;hb=46cd39fb34613f4b331793f19c0e562f93125066;hp=9fe3bf98833d00376196849e55a37a82793ca13f;hpb=0e22120cd28cf208ec2f9200b6a6e96fa0234fca;p=friendica.git diff --git a/src/Render/FriendicaSmartyEngine.php b/src/Render/FriendicaSmartyEngine.php index 9fe3bf9883..5d7ed6c0c9 100644 --- a/src/Render/FriendicaSmartyEngine.php +++ b/src/Render/FriendicaSmartyEngine.php @@ -1,6 +1,6 @@ theme = $theme; + $this->theme = $theme; $this->theme_info = $theme_info; - $work_dir = DI::config()->get('smarty3', 'config_dir'); - $this->smarty = new FriendicaSmarty($this->theme, $this->theme_info, $work_dir); + + $work_dir = DI::config()->get('smarty3', 'config_dir'); + $use_sub_dirs = DI::config()->get('smarty3', 'use_sub_dirs'); + + $this->smarty = new FriendicaSmarty($this->theme, $this->theme_info, $work_dir, $use_sub_dirs); if (!is_writable($work_dir)) { $admin_message = DI::l10n()->t('The folder %s must be writable by webserver.', $work_dir); @@ -78,7 +81,7 @@ final class FriendicaSmartyEngine extends TemplateEngine // "middleware": inject variables into templates $arr = [ - 'template' => basename($this->smarty->filename), + 'template' => basename($this->smarty->filename ?? ''), 'vars' => $vars ]; Hook::callAll('template_vars', $arr);