New function: sqimap_create_stream(). Returns an IMAP stream.
[squirrelmail.git] / src / move_messages.php
index 51af2ce4d2efe10d4d8ac8d5d632a4cf79e2f472..4fe2994ada578f85034705b26dc9ea70972a4108 100644 (file)
@@ -77,7 +77,7 @@ function attachSelectedMessages($msg, $imapConnection) {
             $fp = fopen( $full_localfilename, 'wb');
             fwrite ($fp, $body);
             fclose($fp);
-            $composeMessage->initAttachment('message/rfc822',$subject.'.eml',
+            $composeMessage->initAttachment('message/rfc822',$subject.'.msg',
                  $full_localfilename);
         }
     }
@@ -114,6 +114,7 @@ sqgetGlobalVar('markRead',        $markRead,        SQ_POST);
 sqgetGlobalVar('markUnread',      $markUnread,      SQ_POST);
 sqgetGlobalVar('attache',         $attache,         SQ_POST);
 sqgetGlobalVar('location',        $location,        SQ_POST);
+sqgetGlobalVar('bypass_trash',    $bypass_trash,    SQ_POST);
 
 /* end of get globals */
 
@@ -178,7 +179,7 @@ if(isset($expungeButton)) {
                 sqimap_toggle_flag($imapConnection, $id, '\\Seen',false,true);
             } else  {
                 if (!$button_action) {
-                    sqimap_msgs_list_delete($imapConnection, $mailbox, $id);
+                    sqimap_msgs_list_delete($imapConnection, $mailbox, $id,$bypass_trash);
                     if ($auto_expunge) {
                         $cnt = sqimap_mailbox_expunge($imapConnection, $mailbox, true);
                     }
@@ -209,7 +210,7 @@ if(isset($expungeButton)) {
 } else {    // Move messages
 
     if (count($id)) {
-        sqimap_msgs_list_copy($imapConnection,$id,$targetMailbox);
+        sqimap_msgs_list_move($imapConnection,$id,$targetMailbox);
         if ($auto_expunge) {
             $cnt = sqimap_mailbox_expunge($imapConnection, $mailbox, true);
         } else {