clean up the stored serialized attachment var in the user.pref file.
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Jul 2002 23:17:13 +0000 (23:17 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 31 Jul 2002 23:17:13 +0000 (23:17 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3217 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/smtp.php

index f04200a874d9a27534a35b3c97e289e44b3e5015..9bcda6fcd0ab3051349e19aa3713e5bc4294d9a6 100644 (file)
@@ -189,7 +189,7 @@ function attachFiles ($fp, $session, $rn="\r\n") {
 /* Delete files that are uploaded for attaching
  */
 function deleteAttachments($session) {
-    global $username, $attachments, $attachment_dir;
+    global $username, $attachments, $attachment_dir, $data_dir;
     $hashed_attachment_dir = getHashedDir($username, $attachment_dir);
 
     $rem_attachments = array();
@@ -204,6 +204,7 @@ function deleteAttachments($session) {
         }
     }
     $attachments = $rem_attachments;
+    setPref($data_dir, $username, 'attachments', serialize($attachments));
 }
 
 /* Return a nice MIME-boundary