Просмотр исходного кода

* Removed sqimap_mailbox_close() function -- automatically expunges mailbox
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.

Luke Ehresman 24 лет назад
Родитель
Сommit
65dc422fae

+ 1 - 0
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.

+ 0 - 9
functions/imap_mailbox.php

@@ -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);
    }
 
 
@@ -27,14 +26,6 @@
       }
    }
 
-   /******************************************************************************
-    **  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
     ******************************************************************************/

+ 0 - 1
functions/smtp.php

@@ -501,7 +501,6 @@
             $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

+ 0 - 4
functions/tree.php

@@ -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);
             }
          }
       }
@@ -106,7 +104,6 @@
          
          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"]);
@@ -114,7 +111,6 @@
          $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);
       }
    }
 

+ 0 - 1
src/compose.php

@@ -113,7 +113,6 @@
          
          $body = ereg_replace('\\\\', '\\\\', $body);
 
-         sqimap_mailbox_close($imapConnection);
          return;
       }
 

+ 0 - 1
src/delete_message.php

@@ -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);
 ?>

+ 0 - 1
src/download.php

@@ -155,6 +155,5 @@
       }
    }    
     
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout($imapConnection);
 ?>

+ 0 - 1
src/move_messages.php

@@ -145,7 +145,6 @@
    }
 
    // Log out this session
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout($imapConnection);
 
 ?>

+ 0 - 1
src/read_body.php

@@ -80,7 +80,6 @@
       }
       echo "</td></tr></table>\n";
       echo "</body></html>";
-      sqimap_mailbox_close($imapConnection);
       sqimap_logout($imapConnection);
       exit;
    }

+ 0 - 2
src/right_main.php

@@ -123,8 +123,6 @@
    }
 
    do_hook("right_main_bottom");
-   // close the connection
-   sqimap_mailbox_close($imapConnection);
    sqimap_logout ($imapConnection);
 ?>
 </FONT>

+ 0 - 1
src/search.php

@@ -100,7 +100,6 @@
    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);