mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
IMAP: Simplify expunge
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
* - editing the message shows some other information
|
* - editing the message shows some other information
|
||||||
* - deleting marks the message for deletion but doesn't expunge the mailbox
|
* - deleting marks the message for deletion but doesn't expunge the mailbox
|
||||||
* - inserting or updating the message does nothing
|
* - 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;
|
namespace Adminer;
|
||||||
@@ -108,8 +108,8 @@ if (isset($_GET["imap"])) {
|
|||||||
return imap_deletemailbox($this->imap, $this->mailbox . $name);
|
return imap_deletemailbox($this->imap, $this->mailbox . $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
function expunge($name) {
|
function expunge() {
|
||||||
return imap_expunge($this->imap);
|
return imap_expunge();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,11 +274,7 @@ if (isset($_GET["imap"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function truncate_tables($tables) {
|
function truncate_tables($tables) {
|
||||||
$return = true;
|
return connection()->expunge($name);
|
||||||
foreach ($tables as $name) {
|
|
||||||
$return = $return && connection()->expunge($name);
|
|
||||||
}
|
|
||||||
return $return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function connect($credentials) {
|
function connect($credentials) {
|
||||||
|
Reference in New Issue
Block a user