* Removed sqimap_mailbox_close() function -- automatically expunges mailbox
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 9 Jan 2001 01:12:47 +0000 (01:12 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 9 Jan 2001 01:12:47 +0000 (01:12 +0000)
    when it closes.  Someone suggested that we use this, and I hadn't
    researched its functionality enough before implementing
* Made the $auto_expunge variable actually do something.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@919 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/imap_mailbox.php
functions/smtp.php
functions/tree.php
src/compose.php
src/delete_message.php
src/download.php
src/move_messages.php
src/read_body.php
src/right_main.php
src/search.php

index 819dfead551f3c0d5c40fce591eb58ab69aebb88..9e069300eb0d13c636eb22d1a3c3469c47831821 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 Version 1.0pre2 -- DEVELOPMENT
 ------------------------------
+- Made $auto_expunge variable actually do something
 - Fixed bug that didn't display login failure message
 - Fixed minor bug in sqimap_mailbox_list
 - Added sqimap_capability function to check capabilities of server.
index d77bd1fe2227ee369d71246a84a8cf6e48a0f855..5916ae45ad8aa14696d5b35ca0ed239fa2c5671d 100755 (executable)
@@ -12,7 +12,6 @@
       sqimap_mailbox_select ($imap_stream, $mailbox);
       fputs ($imap_stream, "a001 EXPUNGE\r\n");
       $read = sqimap_read_data($imap_stream, "a001", $handle_errors, $response, $message);
-      sqimap_mailbox_close ($imap_stream);
    }
 
 
       }
    }
 
-   /******************************************************************************
-    **  Closes an open mailbox 
-    ******************************************************************************/
-   function sqimap_mailbox_close ($imap_stream) {
-      fputs ($imap_stream, "a001 CLOSE\r\n");
-      $tmp = sqimap_read_data($imap_stream, "a001", false, $response, $message);
-   }
-
    /******************************************************************************
     **  Selects a mailbox
     ******************************************************************************/
index 8c945bbd89b0fd81e7af5894d09bcca1fa087343..dae83a2a6f22fdf9516ebcec33721d531cd80ae9 100644 (file)
             $more_headers["In-Reply-To"] = $hdr->message_id;
             $more_headers["References"]  = $hdr->message_id;
          }
-         sqimap_mailbox_close($imap_stream);
       }
 
       // In order to remove the problem of users not able to create
index 28cb3e5b86b412a6533b72a758c511c53a1627ad..83e2a933438c0612c92fe10972cef3c8971f0b0d 100644 (file)
@@ -61,7 +61,6 @@
                sqimap_mailbox_select($imap_stream, $trash_folder);
                sqimap_messages_flag ($imap_stream, 1, $numMessages, "Deleted");
                sqimap_mailbox_expunge($imap_stream, $trash_folder, true);
-               sqimap_mailbox_close($imap_stream);
             }
          }
       } else {
@@ -73,7 +72,6 @@
                sqimap_mailbox_select($imap_stream, $trash_folder);
                sqimap_messages_flag ($imap_stream, 1, $numMessages, "Deleted");
                sqimap_mailbox_expunge($imap_stream, $trash_folder, true);
-               sqimap_mailbox_close($imap_stream);
             }
          }
       }
          
          for ($j = 0;$j < count($tree[$index]["subNodes"]); $j++)
             walkTreeInPostOrderCreatingFoldersUnderTrash($tree[$index]["subNodes"][$j], $imap_stream, $tree, $dm, $topFolderName);
-         sqimap_mailbox_close($imap_stream);
       } else {
          sqimap_mailbox_create($imap_stream, $trash_folder . $dm . $subFolderName, "");
          sqimap_mailbox_select($imap_stream, $tree[$index]["value"]);
          $messageCount = sqimap_get_num_messages($imap_stream, $tree[$index]["value"]);
          if ($messageCount > 0)
             sqimap_messages_copy($imap_stream, 1, $messageCount, $trash_folder . $dm . $subFolderName);
-         sqimap_mailbox_close($imap_stream);
       }
    }
 
index 565bd923c966626e3c784dfe91f54a3360a47355..d35e35f42d803e3e4a9a4347ee6598a12c2fe1c2 100644 (file)
          
          $body = ereg_replace('\\\\', '\\\\', $body);
 
-         sqimap_mailbox_close($imapConnection);
          return;
       }
 
index 086750e6b424052159a2460c43a45a05bd913c28..4be7772f584af44e4b6b72665460367dcbe06050 100644 (file)
@@ -37,6 +37,5 @@
    else   
       header ("Location: $location/right_main.php?sort=$sort&startMessage=$startMessage&mailbox=".urlencode($mailbox));
 
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout($imapConnection);
 ?>
index faaafc62eb35d272a177e29508da92b1f7f4eeef..27b4d69caf9eebb591f8f8b61622086c72c52e29 100644 (file)
       }
    }    
     
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout($imapConnection);
 ?>
index ae7155c4bcb526524734b4275d5457a41796810e..cd1056e4e5f06f5fe2023747d4320567a4bdcfbd 100644 (file)
    }
 
    // Log out this session
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout($imapConnection);
 
 ?>
index 5825218a6f925c2d2fa505e5e5d91025330cde2d..21a6e6896e99d0a6a435d6999cda9eb4e23ab3c6 100644 (file)
@@ -80,7 +80,6 @@
       }
       echo "</td></tr></table>\n";
       echo "</body></html>";
-      sqimap_mailbox_close($imapConnection);
       sqimap_logout($imapConnection);
       exit;
    }
index 6c1ca9b06cd8268b7aa472e343a5a96f80018ba1..3f6bba8add1da97b841942b086e96f7139d62c4c 100644 (file)
    }
 
    do_hook("right_main_bottom");
-   // close the connection
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout ($imapConnection);
 ?>
 </FONT>
index ed92be5e85d7a2173d7d65f9e43b07483764882e..03945730b8b7ccaedf6a305e1a1cc93399a5b07e 100644 (file)
    if ($where && $what) {   
       sqimap_mailbox_select($imapConnection, $mailbox);
       sqimap_search($imapConnection, $where, $what, $mailbox, $color);
-      sqimap_mailbox_close($imapConnection);
    }
    do_hook("search_bottom");
    sqimap_logout ($imapConnection);