From: Stricted Date: Sat, 6 Jun 2015 21:50:07 +0000 (+0200) Subject: check if smarty exists X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97c78a9a1f4561f8d210b5e1c58b2e6d3f46278a;p=GitHub%2FStricted%2FDomain-Control-Panel.git check if smarty exists --- diff --git a/lib/api/page/IndexPage.class.php b/lib/api/page/IndexPage.class.php index 40a2cfc..4578f81 100644 --- a/lib/api/page/IndexPage.class.php +++ b/lib/api/page/IndexPage.class.php @@ -8,8 +8,8 @@ use dns\page\AbstractPage; * @copyright 2013-2015 Jan Altensen (Stricted) */ class IndexPage extends AbstractPage { - public function prepare () { - /* we have no index page */ - exit; - } + public function prepare () { + /* we have no index page */ + exit; + } } \ No newline at end of file diff --git a/lib/system/DNS.class.php b/lib/system/DNS.class.php index 31d428c..1ca2bb2 100644 --- a/lib/system/DNS.class.php +++ b/lib/system/DNS.class.php @@ -278,6 +278,10 @@ class DNS { $tpl = self::getSession()->tpl; } + if (!file_exists(DNS_DIR.'/lib/system/api/smarty/libs/Smarty.class.php')) { + throw new SystemException('Unable to find Smarty'); + } + require_once(DNS_DIR.'/lib/system/api/smarty/libs/Smarty.class.php'); self::$tplObj = new \Smarty;