From 8efadc6b262986fcdd13d43248f7ab337f773ba9 Mon Sep 17 00:00:00 2001 From: tokul Date: Mon, 22 May 2006 17:43:43 +0000 Subject: [PATCH] initialize template object here. logout_error() depends on it. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11152 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- include/init.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/init.php b/include/init.php index e4ee4445..236e1d08 100644 --- a/include/init.php +++ b/include/init.php @@ -292,6 +292,23 @@ switch ($sInitLocation) { return; } + /** + * Initialize the template object (logout_error uses it) + */ + require(SM_PATH . 'class/template/template.class.php'); + /* + * $sTplDir is not initialized when a user is not logged in, so we will use + * the config file defaults here. If the neccesary variables are net set, + * force a default value. + */ + $aTemplateSet = ( !isset($aTemplateSet) ? array() : $aTemplateSet ); + $templateset_default = ( !isset($templateset_default) ? 0 : $templateset_default ); + + $sTplDir = ( !isset($aTemplateSet[$templateset_default]['PATH']) ? + SM_PATH . 'templates/default/' : + $aTemplateSet[$templateset_default]['PATH'] ); + $oTemplate = new Template($sTplDir); + set_up_language($squirrelmail_language, true); logout_error( _("You must be logged in to access this page.") ); exit; -- 2.25.1