X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsignout.php;h=37e5a2d6fb33863e84e045cb56668f2a81d8d8ce;hb=fb8c42963be48f85ebffd627e98c833cfcbd6dc7;hp=1cf9ff6504b09d7c8244c56ca148e082aaf26001;hpb=3c62d3ea2b224141eb2c31b066f5f98505052506;p=squirrelmail.git diff --git a/src/signout.php b/src/signout.php index 1cf9ff65..37e5a2d6 100644 --- a/src/signout.php +++ b/src/signout.php @@ -5,7 +5,7 @@ * * Cleans up after the user. Resets cookies and terminates session. * - * @copyright © 1999-2006 The SquirrelMail Project Team + * @copyright © 1999-2007 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -35,7 +35,9 @@ if (! sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) { $base_uri = sqm_baseuri(); } -do_hook('logout'); +$login_uri = 'login.php'; + +do_hook('logout', $login_uri); sqsession_destroy(); @@ -49,23 +51,21 @@ if ($signout_page) { /* After a reload of signout.php, $oTemplate might not exist anymore. * Recover, so that we don't get all kinds of errors in that situation. */ if ( !isset($oTemplate) || !is_object($oTemplate) ) { - require_once(SM_PATH . 'class/template/template.class.php'); - $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']; - $icon_theme_path = !$use_icons ? NULL : $sTplDir . 'images/'; - $oTemplate = new Template($sTplDir); + require_once(SM_PATH . 'class/template/Template.class.php'); + $sTemplateID = Template::get_default_template_set(); + $icon_theme_path = !$use_icons ? NULL : Template::calculate_template_images_directory($sTemplateID); + $oTemplate = Template::construct_template($sTemplateID); // We want some variables to always be available to the template - $always_include = array('sTplDir', 'icon_theme_path'); + $oTemplate->assign('javascript_on', checkForJavascript()); + $oTemplate->assign('base_uri', sqm_baseuri()); + $always_include = array('sTemplateID', '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 */ @@ -74,6 +74,7 @@ set_up_language($squirrelmail_language, true, true); displayHtmlHeader($org_title . ' - ' . _("Signout")); $oTemplate->assign('frame_top', $frame_top); +$oTemplate->assign('login_uri', $login_uri); $oTemplate->display('signout.tpl');