Restart the session after forward as attachment.
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 16 Apr 2005 15:31:58 +0000 (15:31 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 16 Apr 2005 15:31:58 +0000 (15:31 +0000)
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

src/right_main.php
src/search.php

index 8d2f9efbb099c7454aaa74b355e1c4ed837d0830..b87d4b05fa52a46cd884ad0dedcc0df1707be7a0 100644 (file)
@@ -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 &amp;, 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');
index 5b2118632ca8370d5b65f54e4c81c09fc4b061fa..acbc6dc8cc3ef6146a575b499e9fc2c54132a467 100644 (file)
@@ -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';