*/
namespace Friendica\Render;
-use Friendica\Core\Addon;
+use Friendica\Core\Hook;
/**
* Smarty implementation of the Friendica template engine interface
{
if (!is_writable('view/smarty3/')) {
echo "<b>ERROR:</b> folder <tt>view/smarty3/</tt> must be writable by webserver.";
- killme();
+ exit();
}
}
$s = new FriendicaSmarty();
}
- $r['$APP'] = get_app();
+ $r['$APP'] = \get_app();
// "middleware": inject variables into templates
$arr = [
"template" => basename($s->filename),
"vars" => $r
];
- Addon::callHooks("template_vars", $arr);
+ Hook::callAll("template_vars", $arr);
$r = $arr['vars'];
foreach ($r as $key => $value) {
public function getTemplateFile($file, $root = '')
{
- $a = get_app();
+ $a = \get_app();
$template = new FriendicaSmarty();
// Make sure $root ends with a slash /