store attachments in user_pref for restoring compose sessions
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 16 Aug 2002 13:03:56 +0000 (13:03 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 16 Aug 2002 13:03:56 +0000 (13:03 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3328 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index 8684498935275c3d5aa07e6e7f323714f43624f1..acda70a9cbcb2af4c3e1b91a58d34b27a4bed9f7 100644 (file)
@@ -648,15 +648,14 @@ function getAttachments($message, $session, $passed_id, $entities, $imapConnecti
                 $passed_id, $message->entity_id),
                 $message->header->encoding));
             fclose ($fp);
-
             $attachments[] = $newAttachment;
-            setPref($data_dir, $username, 'attachments', $attachments);
         }
     } else {
         for ($i = 0; $i < count($message->entities); $i++) {
             getAttachments($message->entities[$i], $session, $passed_id, $entities, $imapConnection);
         }
     }
+    setPref($data_dir, $username, 'attachments', serialize($attachments));    
     return;
 }
 
@@ -693,6 +692,7 @@ function getMessage_RFC822_Attachment($message, $session, $passed_id,
        $newAttachment['session'] = $session;
        $attachments[] = $newAttachment;
     }
+    setPref($data_dir, $username, 'attachments', serialize($attachments));
     return;
 }