Check PERMANENTFLAGS before saving MDNSent flag (#1484963, #1485163)
| | |
| | | 2008/07/14 (thomasb) |
| | | ---------- |
| | | - Re-enable autocomplete attribute for login form (#1485211) |
| | | - Check PERMANENTFLAGS before saving $MDNSent flag (#1484963, #1485163) |
| | | |
| | | 2008/06/30 (alec) |
| | | ---------- |
| | |
| | | { |
| | | protected $tagname = 'input'; |
| | | protected $type = 'text'; |
| | | protected $allowed = array('type','name','value','size','tabindex','autocomplete','checked'); |
| | | protected $allowed = array('type','name','value','size','tabindex','autocomplete','checked','onchange'); |
| | | |
| | | public function __construct($attrib = array()) |
| | | { |
| | |
| | | class html_textarea extends html |
| | | { |
| | | protected $tagname = 'textarea'; |
| | | protected $allowed = array('name','rows','cols','wrap','tabindex'); |
| | | protected $allowed = array('name','rows','cols','wrap','tabindex','onchange'); |
| | | |
| | | /** |
| | | * Get HTML code for this object |
| | |
| | | { |
| | | protected $tagname = 'select'; |
| | | protected $options = array(); |
| | | protected $allowed = array('name','size','tabindex','autocomplete','multiple','onchange'); |
| | | |
| | | /** |
| | | * Add a new option to this drop-down |
| | |
| | | |
| | | |
| | | /** |
| | | * Checks the PERMANENTFLAGS capability of the current mailbox |
| | | * and returns true if the given flag is supported by the IMAP server |
| | | * |
| | | * @param string Permanentflag name |
| | | * @return mixed True if this flag is supported |
| | | * @access public |
| | | */ |
| | | function check_permflag($flag) |
| | | { |
| | | $flagsmap = $GLOBALS['IMAP_FLAGS']; |
| | | return (($imap_flag = $flagsmap[strtoupper($flag)]) && in_array_nocase($imap_flag, $this->conn->permanentflags)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Returns the delimiter that is used by the IMAP server for folder separation |
| | | * |
| | | * @return string Delimiter string |
| | |
| | | |
| | | $GLOBALS['IMAP_SERVER_TZ'] = date('Z'); |
| | | |
| | | $GLOBALS['IMAP_FLAGS'] = array( |
| | | 'SEEN' => '\\Seen', |
| | | 'DELETED' => '\\Deleted', |
| | | 'RECENT' => '\\Recent', |
| | | 'ANSWERED' => '\\Answered', |
| | | 'DRAFT' => '\\Draft', |
| | | 'FLAGGED' => '\\Flagged', |
| | | 'FORWARDED' => '$Forwarded', |
| | | 'MDNSENT' => '$MDNSent'); |
| | | |
| | | $iil_error; |
| | | $iil_errornum; |
| | | $iil_selected; |
| | |
| | | var $rootdir; |
| | | var $delimiter; |
| | | var $capability = array(); |
| | | var $permanentflags = array(); |
| | | } |
| | | |
| | | /** |
| | |
| | | var $priority; |
| | | var $mdn_to; |
| | | var $mdn_sent = false; |
| | | var $is_reply = false; |
| | | var $is_draft = false; |
| | | var $seen = false; |
| | | var $deleted = false; |
| | | var $recent = false; |
| | |
| | | if (strcasecmp($a[2], 'RECENT') == 0) { |
| | | $conn->recent = (int) $a[1]; |
| | | } |
| | | } |
| | | else if (preg_match('/\[?PERMANENTFLAGS\s+\(([^\)]+)\)\]/U', $line, $match)) { |
| | | $conn->permanentflags = explode(' ', $match[1]); |
| | | } |
| | | } while (!iil_StartsWith($line, 'sel1')); |
| | | |
| | |
| | | $result[$id]->answered = true; |
| | | } else if (strcasecmp($val, '$Forwarded') == 0) { |
| | | $result[$id]->forwarded = true; |
| | | } else if (strcasecmp($val, 'Draft') == 0) { |
| | | $result[$id]->is_draft = true; |
| | | } else if (strcasecmp($val, '$MDNSent') == 0) { |
| | | $result[$id]->mdn_sent = true; |
| | | } else if (strcasecmp($val, 'Flagged') == 0) { |
| | |
| | | } |
| | | |
| | | $fp = $conn->fp; |
| | | $flags = array( |
| | | 'SEEN' => '\\Seen', |
| | | 'DELETED' => '\\Deleted', |
| | | 'RECENT' => '\\Recent', |
| | | 'ANSWERED' => '\\Answered', |
| | | 'DRAFT' => '\\Draft', |
| | | 'FLAGGED' => '\\Flagged', |
| | | 'FORWARDED' => '$Forwarded', |
| | | 'MDNSENT' => '$MDNSent'); |
| | | $flags = $GLOBALS['IMAP_FLAGS']; |
| | | |
| | | $flag = strtoupper($flag); |
| | | $flag = $flags[$flag]; |
| | |
| | | |
| | | $message = new rcube_message($uid); |
| | | |
| | | if ($message->headers->mdn_to && !$message->headers->mdn_sent) |
| | | if ($message->headers->mdn_to && !$message->headers->mdn_sent && $IMAP->check_permflag('MDNSENT')) |
| | | { |
| | | $identity = $RCMAIL->user->get_identity(); |
| | | $sender = format_email_recipient($identity['email'], $identity['name']); |
| | |
| | | $OUTPUT->set_env('sender', $MESSAGE->sender['string']); |
| | | |
| | | // check for unset disposition notification |
| | | if ($MESSAGE->headers->mdn_to && !$MESSAGE->headers->mdn_sent && |
| | | $mbox_name != $CONFIG['drafts_mbox'] && $mbox_name != $CONFIG['sent_mbox']) |
| | | if ($MESSAGE->headers->mdn_to && |
| | | !$MESSAGE->headers->mdn_sent && |
| | | $IMAP->check_permflag('MDNSENT') && |
| | | $mbox_name != $CONFIG['drafts_mbox'] && |
| | | $mbox_name != $CONFIG['sent_mbox']) |
| | | { |
| | | if (intval($CONFIG['mdn_requests']) === 1) |
| | | { |