From: stekkel Date: Sat, 16 Apr 2005 15:31:58 +0000 (+0000) Subject: Restart the session after forward as attachment. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8517e764c0e071f9e81f3b9e101bdb1633030b16;p=squirrelmail.git Restart the session after forward as attachment. sqsession_is_active doesn't restart the session because it does a check on session_id which isn't empty after a session_write_close. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9314 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/right_main.php b/src/right_main.php index 8d2f9efb..b87d4b05 100644 --- a/src/right_main.php +++ b/src/right_main.php @@ -254,8 +254,9 @@ if (isset($aMailbox['FORWARD_SESSION'])) { // write the session in order to make sure that the compose window has // access to the composemessages array which is stored in the session session_write_close(); - sqsession_is_active(); - + // restart the session. Do not use sqsession_is_active because the session_id + // isn't empty after a session_write_close + session_start(); if (!preg_match("/^[0-9]{3,4}$/", $compose_width)) { $compose_width = '640'; } @@ -265,7 +266,7 @@ if (isset($aMailbox['FORWARD_SESSION'])) { // do not use &, it will break the query string and $session will not be detected!!! $comp_uri = SM_PATH . 'src/compose.php?mailbox='. urlencode($mailbox). '&session='.$aMailbox['FORWARD_SESSION']; - displayPageHeader($color, $mailbox, "comp_in_new('$comp_uri', $compose_width, $compose_height);", false); + displayPageHeader($color, $mailbox, "comp_in_new('$comp_uri', $compose_width, $compose_height);", ''); } else { $mailbox_cache[$account.'_'.$aMailbox['NAME']] = $aMailbox; sqsession_register($mailbox_cache,'mailbox_cache'); @@ -281,7 +282,6 @@ if (isset($aMailbox['FORWARD_SESSION'])) { } } else { displayPageHeader($color, $mailbox); -// $compose_uri = $base_uri.'src/compose.php?newmessage=1'; } do_hook('right_main_after_header'); diff --git a/src/search.php b/src/search.php index 5b211863..acbc6dc8 100644 --- a/src/search.php +++ b/src/search.php @@ -1354,7 +1354,9 @@ if (isset($aMailbox['FORWARD_SESSION'])) { // write the session in order to make sure that the compose window has // access to the composemessages array which is stored in the session session_write_close(); - sqsession_is_active(); + // restart the session. Do not use sqsession_is_active because the session_id + // isn't empty after a session_write_close + session_start(); if (!preg_match("/^[0-9]{3,4}$/", $compose_width)) { $compose_width = '640';