recover from lost session [compose related]
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 15 Oct 2002 20:52:34 +0000 (20:52 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 15 Oct 2002 20:52:34 +0000 (20:52 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3864 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/redirect.php

index 14cbca2..85a653c 100644 (file)
@@ -164,10 +164,10 @@ if ($javascript_setting != SMPREF_JS_ON){
 /* Update the prefs */
 setPref($data_dir, $username, 'javascript_on', $js_pref);
 
-global $attachments;
-$attachments = unserialize(getPref($data_dir, $username, 'attachments', 0));
 /* Compute the URL to forward the user to. */
-    global $session_expired_location, $session_expired_post;
+    $session_expired_location= $_SESSION['session_expired_location'];
+    $session_expired_post= $_SESSION['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) {
@@ -177,22 +177,9 @@ $attachments = unserialize(getPref($data_dir, $username, 'attachments', 0));
        }
        sqsession_unregister('session_expired_location');
        unset($session_expired_location);
-       if (is_array($compose_messages)) {
-          sqsession_register('compose_messages');
-       }
+
+
     } else {
-/* need to be adapted to compose_messages.
-       if (is_array($attachments)) {
-          $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
-          foreach ($attachments as $attachment) {
-            $attached_file = $hashed_attachment_dir.'/'.$attachment['localfilename'];
-            if (file_exists($attached_file)) {
-                unlink($attached_file);
-            }
-          }
-          removePref($data_dir, $username, 'attachments');
-       }
-*/       
        $redirect_url = 'webmail.php';
     }