Ignore:
Timestamp:
10/08/13 16:20:46 (11 years ago)
Author:
douglas
Message:

Ticket #0000 - Copiadas as alterações do Trunk. Versão final 2.5.1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/zpush/backend/expresso/providers/imapProvider.php

    r8169 r8232  
    497497            if (!empty($bccaddr)) $headers .= "\nBcc: $bccaddr"; 
    498498            // changed by mku ZP-330 
    499   
    500             require_once(__DIR__."/../../../../library/Mail/Mail.php");  
    501             $mail_object =& Mail::factory("smtp", $GLOBALS['config']['SMTP']);  
    502             $send = $mail_object->send($toaddr, $message->headers , $body);  
    503           //  $send =  @mail ( $toaddr, $message->headers["subject"], $body, $headers, $envelopefrom );  
     499 
     500            require_once(__DIR__."/../../../../library/Mail/Mail.php"); 
     501            $mail_object =& Mail::factory("smtp", $GLOBALS['config']['SMTP']); 
     502            $send = $mail_object->send($toaddr, $message->headers , $body); 
     503          //  $send =  @mail ( $toaddr, $message->headers["subject"], $body, $headers, $envelopefrom ); 
    504504        } 
    505505 
     
    904904 
    905905        // build name for new mailboxBackendMaildir 
    906         $displayname = Utils::Utf7_iconv_encode(Utils::Utf8_to_utf7($displayname)); 
    907         $newname = $this->server . $folderid . $this->serverdelimiter . $displayname; 
    908  
     906        $displayname = Utils::Utf7_iconv_encode(Utils::Utf8_to_utf7($displayname));; 
     907        $new = $this->server . $this->getImapIdFromFolderId($folderid) . $this->serverdelimiter.  $displayname; 
    909908        $csts = false; 
    910         // if $id is set => rename mailbox, otherwise create 
    911         if ($oldid) { 
    912             // rename doesn't work properly with IMAP 
    913             // the activesync client doesn't support a 'changing ID' 
    914             // TODO this would be solved by implementing hex ids (Mantis #459) 
    915             //$csts = imap_renamemailbox($this->mbox, $this->server . imap_utf7_encode(str_replace(".", $this->serverdelimiter, $oldid)), $newname); 
    916         } 
    917         else { 
    918             $csts = @imap_createmailbox($this->mbox, $newname); 
    919         } 
     909 
     910        $csts = ($oldid) ? imap_renamemailbox($this->mbox,  $this->server .$this->getImapIdFromFolderId($oldid) , $new) : imap_createmailbox($this->mbox, $new); 
     911 
    920912        if ($csts) { 
    921             return $this->StatFolder($folderid . $this->serverdelimiter . $displayname); 
     913           $newId =  $this->convertImapId($new); 
     914           return $this->StatFolder($newId); 
    922915        } 
    923916        else 
     
    936929     * 
    937930     */ 
    938     public function DeleteFolder($id, $parentid){ 
    939         // TODO implement 
    940         return false; 
     931    public function DeleteFolder($id, $parentid) 
     932    { 
     933        $ret = imap_deletemailbox($this->mbox , $this->server .$this->getImapIdFromFolderId($id) ); 
     934        imap_expunge( $this->mbox ); 
     935        return $ret; 
    941936    } 
    942937 
Note: See TracChangeset for help on using the changeset viewer.