Changeset 8131 for trunk/zpush/backend/expresso/providers/imapProvider.php
- Timestamp:
- 05/02/13 15:19:28 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zpush/backend/expresso/providers/imapProvider.php
r8026 r8131 903 903 904 904 // build name for new mailboxBackendMaildir 905 $displayname = Utils::Utf7_iconv_encode(Utils::Utf8_to_utf7($displayname)); 906 $newname = $this->server . $folderid . $this->serverdelimiter . $displayname; 907 905 $displayname = Utils::Utf7_iconv_encode(Utils::Utf8_to_utf7($displayname));; 906 $new = $this->server . $this->getImapIdFromFolderId($folderid) . $this->serverdelimiter. $displayname; 908 907 $csts = false; 909 // if $id is set => rename mailbox, otherwise create 910 if ($oldid) { 911 // rename doesn't work properly with IMAP 912 // the activesync client doesn't support a 'changing ID' 913 // TODO this would be solved by implementing hex ids (Mantis #459) 914 //$csts = imap_renamemailbox($this->mbox, $this->server . imap_utf7_encode(str_replace(".", $this->serverdelimiter, $oldid)), $newname); 915 } 916 else { 917 $csts = @imap_createmailbox($this->mbox, $newname); 918 } 908 909 $csts = ($oldid) ? imap_renamemailbox($this->mbox, $this->server .$this->getImapIdFromFolderId($oldid) , $new) : imap_createmailbox($this->mbox, $new); 910 919 911 if ($csts) { 920 return $this->StatFolder($folderid . $this->serverdelimiter . $displayname); 912 $newId = $this->convertImapId($new); 913 return $this->StatFolder($newId); 921 914 } 922 915 else … … 935 928 * 936 929 */ 937 public function DeleteFolder($id, $parentid){ 938 // TODO implement 939 return false; 930 public function DeleteFolder($id, $parentid) 931 { 932 $ret = imap_deletemailbox($this->mbox , $this->server .$this->getImapIdFromFolderId($id) ); 933 imap_expunge( $this->mbox ); 934 return $ret; 940 935 } 941 936
Note: See TracChangeset
for help on using the changeset viewer.