From: Marc G. K. <st...@us...> - 2002-07-31 21:42:50
|
Update of /cvsroot/squirrelmail/squirrelmail/src In directory usw-pr-cvs1:/tmp/cvs-serv13060 Modified Files: redirect.php Log Message: sets redirection location to the recovered session location Index: redirect.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/src/redirect.php,v retrieving revision 1.50 retrieving revision 1.51 diff -u -w -r1.50 -r1.51 --- redirect.php 6 Apr 2002 22:44:48 -0000 1.50 +++ redirect.php 31 Jul 2002 21:42:48 -0000 1.51 @@ -86,11 +86,13 @@ logout_error( _("You must be logged in to access this page.") ); exit; } else { + $sqimap_capabilities = sqimap_capability($imapConnection); + session_register('sqimap_capabilities'); $delimiter = sqimap_get_delimiter ($imapConnection); } sqimap_logout($imapConnection); session_register('delimiter'); - + global $username; $username = $login_username; session_register ('username'); setcookie('key', $key, 0, $base_uri); @@ -146,9 +148,20 @@ $redirect_url = 'webmail.php?right_frame=compose.php&rcptaddress='; $redirect_url .= $rcptemail; } else { + global $session_expired_location, $session_expired_post; + if (isset($session_expired_location) && $session_expired_location) { + $compose_new_win = getPref($data_dir, $username, 'compose_new_win', 0); + if ($compose_new_win) { + $redirect_url = $session_expired_location; + } else { + $redirect_url = 'webmail.php?right_frame='.urldecode($session_expired_location); + } + session_unregister('session_expired_location'); + unset($session_expired_location); + } else { $redirect_url = 'webmail.php'; } - +} /* Send them off to the appropriate page. */ header("Location: $redirect_url"); |