X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FRender%2FFriendicaSmarty.php;h=278fe1f9388cfdcde84a8440c18aa01d89e2d66b;hb=876acd68a0c6f7384c5aa0c78553dd70cd32bd99;hp=b147d7e81b6b4a8a787da6ce3e3c7f4a798fe93e;hpb=e805350ce465b9ff311698767f4bfab4a0080916;p=friendica.git diff --git a/src/Render/FriendicaSmarty.php b/src/Render/FriendicaSmarty.php index b147d7e81b..278fe1f938 100644 --- a/src/Render/FriendicaSmarty.php +++ b/src/Render/FriendicaSmarty.php @@ -6,15 +6,15 @@ namespace Friendica\Render; use Smarty; -define('SMARTY3_TEMPLATE_FOLDER', 'templates'); - /** - * Description of FriendicaSmarty + * Friendica extension of the Smarty3 template engine * - * @author benlo + * @author Hypolite Petovan */ class FriendicaSmarty extends Smarty { + const SMARTY3_TEMPLATE_FOLDER = 'templates'; + public $filename; function __construct() @@ -26,12 +26,12 @@ class FriendicaSmarty extends Smarty // setTemplateDir can be set to an array, which Smarty will parse in order. // The order is thus very important here - $template_dirs = ['theme' => "view/theme/$theme/" . SMARTY3_TEMPLATE_FOLDER . "/"]; + $template_dirs = ['theme' => "view/theme/$theme/" . self::SMARTY3_TEMPLATE_FOLDER . "/"]; if (x($a->theme_info, "extends")) { - $template_dirs = $template_dirs + ['extends' => "view/theme/" . $a->theme_info["extends"] . "/" . SMARTY3_TEMPLATE_FOLDER . "/"]; + $template_dirs = $template_dirs + ['extends' => "view/theme/" . $a->theme_info["extends"] . "/" . self::SMARTY3_TEMPLATE_FOLDER . "/"]; } - $template_dirs = $template_dirs + ['base' => "view/" . SMARTY3_TEMPLATE_FOLDER . "/"]; + $template_dirs = $template_dirs + ['base' => "view/" . self::SMARTY3_TEMPLATE_FOLDER . "/"]; $this->setTemplateDir($template_dirs); $this->setCompileDir('view/smarty3/compiled/');