diff --git a/system/init.php b/system/init.php index 037327c473..764cdd8bee 100644 --- a/system/init.php +++ b/system/init.php @@ -31,9 +31,6 @@ require_once SYSTEM . 'libs/cache.php'; $cache = Cache::getInstance(); -// twig -require_once SYSTEM . 'twig.php'; - // trim values we receive if(isset($_POST)) { @@ -126,6 +123,9 @@ $ots = POT::getInstance(); require_once SYSTEM . 'database.php'; +// twig +require_once SYSTEM . 'twig.php'; + define('USE_ACCOUNT_NAME', $db->hasColumn('accounts', 'name')); // load vocation names $tmp = ''; diff --git a/system/twig.php b/system/twig.php index 19011de70e..ee73f14fa1 100644 --- a/system/twig.php +++ b/system/twig.php @@ -16,6 +16,9 @@ $twig_loader->addPath(PLUGINS); +$twig->addGlobal('logged', false); +$twig->addGlobal('account_logged', new OTS_Account()); + if($dev_mode) { $twig->addExtension(new Twig_DebugExtension()); }