// setTemplateDir can be set to an array, which Smarty will parse in order.
// The order is thus very important here
- $template_dirs = array('theme' => "view/theme/$theme/" . SMARTY3_TEMPLATE_FOLDER . "/");
+ $template_dirs = ['theme' => "view/theme/$theme/" . SMARTY3_TEMPLATE_FOLDER . "/"];
if (x($a->theme_info, "extends"))
- $template_dirs = $template_dirs + array('extends' => "view/theme/" . $a->theme_info["extends"] . "/" . SMARTY3_TEMPLATE_FOLDER . "/");
- $template_dirs = $template_dirs + array('base' => "view/" . SMARTY3_TEMPLATE_FOLDER . "/");
+ $template_dirs = $template_dirs + ['extends' => "view/theme/" . $a->theme_info["extends"] . "/" . SMARTY3_TEMPLATE_FOLDER . "/"];
+ $template_dirs = $template_dirs + ['base' => "view/" . SMARTY3_TEMPLATE_FOLDER . "/"];
$this->setTemplateDir($template_dirs);
$this->setCompileDir('view/smarty3/compiled/');
$r['$APP'] = get_app();
// "middleware": inject variables into templates
- $arr = array(
+ $arr = [
"template" => basename($s->filename),
"vars" => $r
- );
+ ];
call_hooks("template_vars", $arr);
$r = $arr['vars'];