From: stevetruckstuff Date: Fri, 25 Aug 2006 23:17:07 +0000 (+0000) Subject: Make sure the error handler is setup, and that icons are available to the template. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=3c62d3ea2b224141eb2c31b066f5f98505052506 Make sure the error handler is setup, and that icons are available to the template. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11645 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/signout.php b/src/signout.php index f15ed39c..1cf9ff65 100644 --- a/src/signout.php +++ b/src/signout.php @@ -53,12 +53,20 @@ if ( !isset($oTemplate) || !is_object($oTemplate) ) { $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'] ); + $sTplDir = !isset($aTemplateSet[$templateset_default]['PATH']) ? SM_PATH . 'templates/default/' : $aTemplateSet[$templateset_default]['PATH']; + $icon_theme_path = !$use_icons ? NULL : $sTplDir . 'images/'; $oTemplate = new Template($sTplDir); + + // We want some variables to always be available to the template + $always_include = array('sTplDir', 'icon_theme_path'); + foreach ($always_include as $var) { + $oTemplate->assign($var, (isset($$var) ? $$var : NULL)); + } } +// The error handler object is probably also not initialized on a refresh +require(SM_PATH . 'class/error.class.php'); +$oErrorHandler = new ErrorHandler($oTemplate,'error_message.tpl'); /* internal gettext functions will fail, if language is not set */ set_up_language($squirrelmail_language, true, true);