* 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 819dfea..9e06930 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 d77bd1f..5916ae4 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
     ******************************************************************************/
    function sqimap_mailbox_select ($imap_stream, $mailbox, $hide=true, $recent=false) {
index 8c945bb..dae83a2 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 28cb3e5..83e2a93 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 565bd92..d35e35f 100644 (file)
          
          $body = ereg_replace('\\\\', '\\\\', $body);
 
-         sqimap_mailbox_close($imapConnection);
          return;
       }
 
index 086750e..4be7772 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 faaafc6..27b4d69 100644 (file)
       }
    }    
     
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout($imapConnection);
 ?>
index ae7155c..cd1056e 100644 (file)
    }
 
    // Log out this session
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout($imapConnection);
 
 ?>
index 5825218..21a6e68 100644 (file)
@@ -80,7 +80,6 @@
       }
       echo "</td></tr></table>\n";
       echo "</body></html>";
-      sqimap_mailbox_close($imapConnection);
       sqimap_logout($imapConnection);
       exit;
    }
index 6c1ca9b..3f6bba8 100644 (file)
    }
 
    do_hook("right_main_bottom");
-   // close the connection
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout ($imapConnection);
 ?>
 </FONT>
index ed92be5..0394573 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);