clean up the stored serialized attachment var in the user.pref file.
[squirrelmail.git] / 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