projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for expunge with UID in the sid
[squirrelmail.git]
/
functions
/
imap_mailbox.php
diff --git
a/functions/imap_mailbox.php
b/functions/imap_mailbox.php
index 44e14a91dca65f3f059282464b1c757646f83299..cebd71b4a0983e186a73bfafa7326937132ef67c 100755
(executable)
--- 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;
/* 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;
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) {
$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++;
}
}
$cnt++;
}
}