diff options
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | program/include/rcube_imap.php | 5 | ||||
-rw-r--r-- | program/lib/imap.inc | 5 | ||||
-rw-r--r-- | program/steps/mail/func.inc | 3 | ||||
-rw-r--r-- | program/steps/mail/show.inc | 2 |
5 files changed, 14 insertions, 5 deletions
@@ -1,6 +1,10 @@ CHANGELOG RoundCube Webmail --------------------------- +2009/01/28 (alec) +---------- +- Fix MDNSent flag checking, use arbitrary keywords (asterisk) flag (#1485706) + 2009/01/23 (alec) ---------- - Fix creation of folders with '&' sign in name diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 5b3267bef..032489c50 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -354,8 +354,9 @@ class rcube_imap */ function check_permflag($flag) { - $flagsmap = $GLOBALS['IMAP_FLAGS']; - return (($imap_flag = $flagsmap[strtoupper($flag)]) && in_array_nocase($imap_flag, $this->conn->permanentflags)); + $flag = strtoupper($flag); + $imap_flag = $GLOBALS['IMAP_FLAGS'][$flag]; + return (in_array_nocase($imap_flag, $this->conn->permanentflags)); } diff --git a/program/lib/imap.inc b/program/lib/imap.inc index cca499b09..7fd4aee26 100644 --- a/program/lib/imap.inc +++ b/program/lib/imap.inc @@ -78,6 +78,7 @@ - support multiquota result - include BODYSTRUCTURE in iil_C_FetchHeaders() - added iil_C_FetchMIMEHeaders() function + - added \* flag support ********************************************************/ @@ -114,7 +115,9 @@ $GLOBALS['IMAP_FLAGS'] = array( 'DRAFT' => '\\Draft', 'FLAGGED' => '\\Flagged', 'FORWARDED' => '$Forwarded', - 'MDNSENT' => '$MDNSent'); + 'MDNSENT' => '$MDNSent', + '*' => '\\*', +); $iil_error; $iil_errornum; diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 06d949838..0ccc2cc13 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1296,7 +1296,8 @@ function rcmail_send_mdn($uid) $message = new rcube_message($uid); - if ($message->headers->mdn_to && !$message->headers->mdn_sent && $IMAP->check_permflag('MDNSENT')) + if ($message->headers->mdn_to && !$message->headers->mdn_sent && + ($IMAP->check_permflag('MDNSENT') || $IMAP->check_permflag('*'))) { $identity = $RCMAIL->user->get_identity(); $sender = format_email_recipient($identity['email'], $identity['name']); diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 091a7a10a..7ae0ae000 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -91,7 +91,7 @@ if ($_GET['_uid']) { // check for unset disposition notification if ($MESSAGE->headers->mdn_to && !$MESSAGE->headers->mdn_sent && !$MESSAGE->headers->seen && - $IMAP->check_permflag('MDNSENT') && + ($IMAP->check_permflag('MDNSENT') || $IMAP->check_permflag('*')) && $mbox_name != $CONFIG['drafts_mbox'] && $mbox_name != $CONFIG['sent_mbox']) { |