X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fredirect.php;h=cce56c618407f84077859f2762239e3792a32037;hb=6f62ecc17c3b4e265b1cd63470c392c84018bb62;hp=de4b5f875278a58ff1bcefbfde1c0b242972e0ff;hpb=66c7cd3fe4a58b3425395325cbce311520651c9b;p=squirrelmail.git diff --git a/src/redirect.php b/src/redirect.php index de4b5f87..cce56c61 100644 --- a/src/redirect.php +++ b/src/redirect.php @@ -5,7 +5,7 @@ * * Derived from webmail.php by Ralf Kraudelt * - * @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,8 +35,8 @@ sqGetGlobalVar('secretkey', $secretkey); if(!sqGetGlobalVar('squirrelmail_language', $squirrelmail_language) || $squirrelmail_language == '') { $squirrelmail_language = $squirrelmail_default_language; } -if (!sqgetGlobalVar('mailto', $mailto)) { - $mailto = ''; +if (!sqgetGlobalVar('mailtodata', $mailtodata)) { + $mailtodata = ''; } /* end of get globals */ @@ -52,7 +52,7 @@ if (!isset($login_username)) { } if (!sqsession_is_registered('user_is_logged_in')) { - do_hook ('login_before'); + do_hook('login_before', $null); $onetimepad = OneTimePadCreate(strlen($secretkey)); $key = OneTimePadEncrypt($secretkey, $onetimepad); @@ -79,13 +79,9 @@ if (!sqsession_is_registered('user_is_logged_in')) { * function which gives us full control how the cookie is set. We do that * to add the HttpOnly cookie attribute which blocks javascript access on * IE6 SP1. - * sqsetcookieflush is needed to send out the headers. sqsetcookie caches - * the cookies to be send. If we don't do that we only can send 1 single cookie - * which is not sufficient. */ sqsetcookie(session_name(),session_id(),false,$base_uri); sqsetcookie('key', $key, false, $base_uri); - sqsetcookieflush(); sqsession_register($onetimepad, 'onetimepad'); @@ -106,12 +102,17 @@ if (!sqsession_is_registered('user_is_logged_in')) { sqsession_register($sqimap_capabilities, 'sqimap_capabilities'); $delimiter = sqimap_get_delimiter ($imapConnection); + if (isset($sqimap_capabilities['NAMESPACE']) && $sqimap_capabilities['NAMESPACE'] == true) { + $namespace = sqimap_get_namespace($imapConnection); + sqsession_register($namespace, 'sqimap_namespace'); + } + sqimap_logout($imapConnection); sqsession_register($delimiter, 'delimiter'); $username = $login_username; sqsession_register ($username, 'username'); - do_hook ('login_verified'); + do_hook('login_verified', $null); } /* Set the login variables. */ @@ -156,9 +157,9 @@ if ( sqgetGlobalVar('session_expired_location', $session_expired_location, SQ_SE unset($session_expired_location); } -if($mailto != '') { - $redirect_url = $location . '/webmail.php?right_frame=compose.php&mailto='; - $redirect_url .= urlencode($mailto); +if($mailtodata != '') { + $redirect_url = $location . '/webmail.php?right_frame=compose.php&mailtodata='; + $redirect_url .= urlencode($mailtodata); } /* Write session data and send them off to the appropriate page. */