]> git.joonet.de Git - adminer.git/commitdiff
IMAP: Simplify expunge
authorJakub Vrana <jakub@vrana.cz>
Tue, 18 Mar 2025 13:56:20 +0000 (14:56 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 18 Mar 2025 13:56:37 +0000 (14:56 +0100)
plugins/drivers/imap.php

index 5615a5942e449244938a3a8078bf14c3c864306e..900eb892fe90991ba2f94a24a1dfcd6591abc743 100644 (file)
@@ -7,7 +7,7 @@
 * - editing the message shows some other information
 * - deleting marks the message for deletion but doesn't expunge the mailbox
 * - inserting or updating the message does nothing
-* @link http://adminer.org/static/plugins/imap.png
+* @link https://www.adminer.org/static/plugins/imap.png
 */
 
 namespace Adminer;
@@ -108,8 +108,8 @@ if (isset($_GET["imap"])) {
                                return imap_deletemailbox($this->imap, $this->mailbox . $name);
                        }
 
-                       function expunge($name) {
-                               return imap_expunge($this->imap);
+                       function expunge() {
+                               return imap_expunge();
                        }
                }
 
@@ -274,11 +274,7 @@ if (isset($_GET["imap"])) {
        }
 
        function truncate_tables($tables) {
-               $return = true;
-               foreach ($tables as $name) {
-                       $return = $return && connection()->expunge($name);
-               }
-               return $return;
+               return connection()->expunge($name);
        }
 
        function connect($credentials) {