From 06b5c3ffab70bd50c2b46dd10aad26c98b8b1a8b Mon Sep 17 00:00:00 2001 From: stekkel Date: Fri, 5 Jul 2002 17:07:48 +0000 Subject: [PATCH] fix for expunge with UID in the sid git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3055 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_mailbox.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php index 44e14a91..cebd71b4 100755 --- a/functions/imap_mailbox.php +++ b/functions/imap_mailbox.php @@ -149,17 +149,20 @@ function isSpecialMailbox( $box ) { /* Expunges a mailbox */ function sqimap_mailbox_expunge ($imap_stream, $mailbox, $handle_errors = true, $id='') { global $uid_support; - if (isset($id)) { + if ($id) { if (is_array($id)) { $id = sqimap_message_list_squisher($id); } $id = ' '.$id; + $uid = $uid_support; + } else { + $uid = false; } - $read = sqimap_run_command($imap_stream, 'EXPUNGE$id', $handle_errors, - $response, $message, $uid_support); + $read = sqimap_run_command($imap_stream, 'EXPUNGE'.$id, $handle_errors, + $response, $message, $uid); $cnt = 0; foreach ($read as $r) { - if (pregmatch('/^\*\s[0-9]+\sEXPUNGE/AUi',$r,$regs)) { + if (preg_match('/^\*\s[0-9]+\sEXPUNGE/AUi',$r,$regs)) { $cnt++; } } -- 2.25.1