Make session restore work in compose_in_new. Cannot do login session reset until...
[squirrelmail.git] / src / login.php
index 4d58deabaad393bda43157c96aa8d6b9a5a7f205..8888865b0016e050e8838cb3e5b97c4eca1a8d1f 100644 (file)
  * @package squirrelmail
  */
 
-// reduces the files included in init.php
-$sInitLocation = 'login';
+/** This is the login page */
+define('PAGE_NAME', 'login');
 
 /**
  * Include the SquirrelMail initialization file.
  */
 require('../include/init.php');
 
-
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'functions/imap_general.php');
 require_once(SM_PATH . 'functions/forms.php');
@@ -31,25 +30,6 @@ require_once(SM_PATH . 'functions/forms.php');
  */
 set_up_language($squirrelmail_language, TRUE, TRUE);
 
-/**
- * In case the last session was not terminated properly, make sure
- * we get a new one, but make sure we preserve session_expired_*
- */
-if ( !empty($_SESSION['session_expired_post']) && !empty($_SESSION['session_expired_location']) ) {
-    $sep = $_SESSION['session_expired_post'];
-    $sel = $_SESSION['session_expired_location'];
-
-    sqsession_destroy();
-    @sqsession_is_active();
-    $_SESSION=array();
-    sqsession_register($sep, 'session_expired_post');
-    sqsession_register($sel, 'session_expired_location');
-} else {
-    sqsession_destroy();
-    @sqsession_is_active();
-    $_SESSION=array();
-}
-
 /**
  * This detects if the IMAP server has logins disabled, and if so,
  * squelches the display of the login form and puts up a message
@@ -144,7 +124,7 @@ if (isset($org_logo) && $org_logo) {
 
 $sm_attribute_str = '';
 if (isset($hide_sm_attributions) && !$hide_sm_attributions) {
-    $sm_attribute_str = _("SquirrelMail Webmail Application")."\n" .
+    $sm_attribute_str = _("SquirrelMail Webmail")."\n" .
                         _("By the SquirrelMail Project Team");
 }
 
@@ -161,7 +141,7 @@ $login_extra = addHidden('js_autodetect_results', SMPREF_JS_OFF).
 
 session_write_close();
 
-$oTemplate->assign('logo_str', $logo_str);
+$oTemplate->assign('logo_str', $logo_str, FALSE);
 $oTemplate->assign('logo_path', $org_logo);
 $oTemplate->assign('sm_attribute_str', $sm_attribute_str);
 // i18n: The %s represents the service provider's name
@@ -169,11 +149,11 @@ $oTemplate->assign('org_name_str', sprintf (_("%s Login"), $org_name));
 // i18n: The %s represents the service provider's name
 $oTemplate->assign('org_logo_str', sprintf (_("The %s logo"), $org_name));
 $oTemplate->assign('login_field_value', $loginname_value);
-$oTemplate->assign('login_extra', $login_extra);
+$oTemplate->assign('login_extra', $login_extra, FALSE);
 
 //FIXME: need to remove *ALL* HTML from this file!
-echo '<body onLoad="squirrelmail_loginpage_onload()">'."\n";
-echo '<form action="redirect.php" method="post" onSubmit="document.forms[0].js_autodetect_results.value='. SMPREF_JS_ON .'">'."\n";
+echo '<body onload="squirrelmail_loginpage_onload()">'."\n";
+echo '<form action="redirect.php" method="post" onsubmit="document.forms[0].js_autodetect_results.value='. SMPREF_JS_ON .'">'."\n";
 do_hook('login_top', $null);
 
 $oTemplate->display('login.tpl');