Changeset 1590 in subversion
- Timestamp:
- Jul 15, 2008 12:48:20 PM (5 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 6 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/html.php (modified) (4 diffs)
-
program/include/rcube_imap.php (modified) (1 diff)
-
program/lib/imap.inc (modified) (7 diffs)
-
program/steps/mail/func.inc (modified) (1 diff)
-
program/steps/mail/show.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r1589 r1590 5 5 ---------- 6 6 - Re-enable autocomplete attribute for login form (#1485211) 7 - Check PERMANENTFLAGS before saving $MDNSent flag (#1484963, #1485163) 7 8 8 9 2008/06/30 (alec) -
trunk/roundcubemail/program/include/html.php
r1589 r1590 249 249 protected $tagname = 'input'; 250 250 protected $type = 'text'; 251 protected $allowed = array('type','name','value','size','tabindex','autocomplete','checked' );251 protected $allowed = array('type','name','value','size','tabindex','autocomplete','checked','onchange'); 252 252 253 253 public function __construct($attrib = array()) … … 417 417 { 418 418 protected $tagname = 'textarea'; 419 protected $allowed = array('name','rows','cols','wrap','tabindex' );419 protected $allowed = array('name','rows','cols','wrap','tabindex','onchange'); 420 420 421 421 /** … … 474 474 protected $tagname = 'select'; 475 475 protected $options = array(); 476 protected $allowed = array('name','size','tabindex','autocomplete','multiple','onchange'); 476 477 477 478 /** … … 514 515 'value' => $option['value'], 515 516 'selected' => (in_array($option['value'], $select, true) || 516 in_array($option['text'], $select, true)) ? 1 : null);517 in_array($option['text'], $select, true)) ? 1 : null); 517 518 518 519 $this->content .= self::tag('option', $attr, Q($option['text'])); -
trunk/roundcubemail/program/include/rcube_imap.php
r1580 r1590 343 343 $cap = strtoupper($cap); 344 344 return $this->capabilities[$cap]; 345 } 346 347 348 /** 349 * Checks the PERMANENTFLAGS capability of the current mailbox 350 * and returns true if the given flag is supported by the IMAP server 351 * 352 * @param string Permanentflag name 353 * @return mixed True if this flag is supported 354 * @access public 355 */ 356 function check_permflag($flag) 357 { 358 $flagsmap = $GLOBALS['IMAP_FLAGS']; 359 return (($imap_flag = $flagsmap[strtoupper($flag)]) && in_array_nocase($imap_flag, $this->conn->permanentflags)); 345 360 } 346 361 -
trunk/roundcubemail/program/lib/imap.inc
r1580 r1590 91 91 $GLOBALS['IMAP_SERVER_TZ'] = date('Z'); 92 92 93 $GLOBALS['IMAP_FLAGS'] = array( 94 'SEEN' => '\\Seen', 95 'DELETED' => '\\Deleted', 96 'RECENT' => '\\Recent', 97 'ANSWERED' => '\\Answered', 98 'DRAFT' => '\\Draft', 99 'FLAGGED' => '\\Flagged', 100 'FORWARDED' => '$Forwarded', 101 'MDNSENT' => '$MDNSent'); 102 93 103 $iil_error; 94 104 $iil_errornum; … … 114 124 var $delimiter; 115 125 var $capability = array(); 126 var $permanentflags = array(); 116 127 } 117 128 … … 143 154 var $mdn_to; 144 155 var $mdn_sent = false; 145 var $is_ reply= false;156 var $is_draft = false; 146 157 var $seen = false; 147 158 var $deleted = false; … … 717 728 } 718 729 if (strcmp($conn->selected, $mailbox) == 0) { 719 return true;730 return true; 720 731 } 721 732 … … 730 741 $conn->exists = (int) $a[1]; 731 742 } 732 if (strcasecmp($a[2], 'RECENT') == 0) { 733 $conn->recent = (int) $a[1]; 734 } 743 if (strcasecmp($a[2], 'RECENT') == 0) { 744 $conn->recent = (int) $a[1]; 745 } 746 } 747 else if (preg_match('/\[?PERMANENTFLAGS\s+\(([^\)]+)\)\]/U', $line, $match)) { 748 $conn->permanentflags = explode(' ', $match[1]); 735 749 } 736 750 } while (!iil_StartsWith($line, 'sel1')); … … 1758 1772 } else if (strcasecmp($val, '$Forwarded') == 0) { 1759 1773 $result[$id]->forwarded = true; 1774 } else if (strcasecmp($val, 'Draft') == 0) { 1775 $result[$id]->is_draft = true; 1760 1776 } else if (strcasecmp($val, '$MDNSent') == 0) { 1761 1777 $result[$id]->mdn_sent = true; … … 1910 1926 1911 1927 $fp = $conn->fp; 1912 $flags = array( 1913 'SEEN' => '\\Seen', 1914 'DELETED' => '\\Deleted', 1915 'RECENT' => '\\Recent', 1916 'ANSWERED' => '\\Answered', 1917 'DRAFT' => '\\Draft', 1918 'FLAGGED' => '\\Flagged', 1919 'FORWARDED' => '$Forwarded', 1920 'MDNSENT' => '$MDNSent'); 1928 $flags = $GLOBALS['IMAP_FLAGS']; 1921 1929 1922 1930 $flag = strtoupper($flag); -
trunk/roundcubemail/program/steps/mail/func.inc
r1580 r1590 1070 1070 $message = new rcube_message($uid); 1071 1071 1072 if ($message->headers->mdn_to && !$message->headers->mdn_sent )1072 if ($message->headers->mdn_to && !$message->headers->mdn_sent && $IMAP->check_permflag('MDNSENT')) 1073 1073 { 1074 1074 $identity = $RCMAIL->user->get_identity(); -
trunk/roundcubemail/program/steps/mail/show.inc
r1539 r1590 83 83 84 84 // check for unset disposition notification 85 if ($MESSAGE->headers->mdn_to && !$MESSAGE->headers->mdn_sent && 86 $mbox_name != $CONFIG['drafts_mbox'] && $mbox_name != $CONFIG['sent_mbox']) 85 if ($MESSAGE->headers->mdn_to && 86 !$MESSAGE->headers->mdn_sent && 87 $IMAP->check_permflag('MDNSENT') && 88 $mbox_name != $CONFIG['drafts_mbox'] && 89 $mbox_name != $CONFIG['sent_mbox']) 87 90 { 88 91 if (intval($CONFIG['mdn_requests']) === 1)
Note: See TracChangeset
for help on using the changeset viewer.
