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