X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsignout.php;h=621f8b9ac1b995d3e7676fe8472cd03707e1da87;hb=918fcc1d131a60df5ba01212d61d82d753014468;hp=f15ed39c17fa328eb3a771fd44f0231703b9bf96;hpb=8f8188aeea5a72fac2005c5527edde67697ee2c4;p=squirrelmail.git diff --git a/src/signout.php b/src/signout.php index f15ed39c..621f8b9a 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_once(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);