diff options
author | svncommit <devs@roundcube.net> | 2006-06-29 23:41:40 +0000 |
---|---|---|
committer | svncommit <devs@roundcube.net> | 2006-06-29 23:41:40 +0000 |
commit | a894ba5029a09fb9d0453b5cf9c944ce313f8a48 (patch) | |
tree | 34ba2e7a2c82d680fb8d772568efa46a83967f98 /program/include/rcube_imap.inc | |
parent | ba8f44c4da7724f5e35866277e9775ec26616dc7 (diff) |
Removeable attachments, Auto-default folder creation, bug fixes
Diffstat (limited to 'program/include/rcube_imap.inc')
-rw-r--r-- | program/include/rcube_imap.inc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index 16cfb522e..d825a35b0 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -362,13 +362,18 @@ class rcube_imap if (!is_array($a_folders) || !sizeof($a_folders)) $a_folders = array(); - // create INBOX if it does not exist - if (!in_array_nocase('INBOX', $a_folders)) + // create Default folders if they do not exist + global $CONFIG; + foreach ($CONFIG['default_imap_folders'] as $folder) { - $this->create_mailbox('INBOX', TRUE); - array_unshift($a_folders, 'INBOX'); + if (!in_array_nocase($folder, $a_folders)) + { + $this->create_mailbox($folder, TRUE); + $this->subscribe($folder); + } } + $a_folders = iil_C_ListSubscribed($this->conn, $this->_mod_mailbox($root), $filter); $a_mailbox_cache = array(); // write mailboxlist to cache @@ -991,6 +996,7 @@ class rcube_imap // append a mail message (source) to a specific mailbox function save_message($mbox_name, &$message) { + $mbox_name = stripslashes($mbox_name); $mailbox = $this->_mod_mailbox($mbox_name); // make sure mailbox exists @@ -1010,6 +1016,8 @@ class rcube_imap // move a message from one mailbox to another function move_message($uids, $to_mbox, $from_mbox='') { + $to_mbox = stripslashes($to_mbox); + $from_mbox = stripslashes($from_mbox); $to_mbox = $this->_mod_mailbox($to_mbox); $from_mbox = $from_mbox ? $this->_mod_mailbox($from_mbox) : $this->mailbox; @@ -1067,6 +1075,7 @@ class rcube_imap // mark messages as deleted and expunge mailbox function delete_message($uids, $mbox_name='') { + $mbox_name = stripslashes($mbox_name); $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; // convert the list of uids to array @@ -1114,6 +1123,7 @@ class rcube_imap // clear all messages in a specific mailbox function clear_mailbox($mbox_name=NULL) { + $mbox_name = stripslashes($mbox_name); $mailbox = !empty($mbox_name) ? $this->_mod_mailbox($mbox_name) : $this->mailbox; $msg_count = $this->_messagecount($mailbox, 'ALL'); @@ -1140,6 +1150,7 @@ class rcube_imap // send IMAP expunge command and clear cache function expunge($mbox_name='', $clear_cache=TRUE) { + $mbox_name = stripslashes($mbox_name); $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; return $this->_expunge($mailbox, $clear_cache); } |