Changeset 7706


Ignore:
Timestamp:
01/07/13 14:00:14 (11 years ago)
Author:
cristiano
Message:

Ticket #3209 - Pegar nomes de pastas padrões da config expresso

Location:
trunk/zpush
Files:
2 edited

Legend:

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

    r7698 r7706  
    557557        if ($this->wasteID == false) { 
    558558            //try to get the waste basket without doing complete hierarchy sync 
    559             $wastebaskt = @imap_getmailboxes($this->mbox, $this->server, "Trash"); 
     559            $wastebaskt = @imap_getmailboxes($this->mbox, $this->server, IMAP_TRASHFOLDER); 
    560560            if (isset($wastebaskt[0])) { 
    561561                $this->wasteID = $this->convertImapId(substr($wastebaskt[0]->name, strlen($this->server))); 
     
    802802            $folder->type = SYNC_FOLDER_TYPE_INBOX; 
    803803        } 
    804         // Zarafa IMAP-Gateway outputs 
    805         else if($lid == "drafts") { 
    806             $folder->parentid = "0"; 
    807             $folder->displayname = "Drafts"; 
    808             $folder->type = SYNC_FOLDER_TYPE_DRAFTS; 
    809         } 
    810         else if($lid == "trash") { 
    811             $folder->parentid = "0"; 
    812             $folder->displayname = "Trash"; 
    813             $folder->type = SYNC_FOLDER_TYPE_WASTEBASKET; 
    814             $this->wasteID = $id; 
    815         } 
    816         else if($lid == "sent" || $lid == "sent items" || $lid == IMAP_SENTFOLDER) { 
    817             $folder->parentid = "0"; 
    818             $folder->displayname = "Sent"; 
    819             $folder->type = SYNC_FOLDER_TYPE_SENTMAIL; 
    820             //$this->sentID = $id; 
    821         } 
     804//        // Zarafa IMAP-Gateway outputs 
     805//        else if($lid == "drafts") { 
     806//            $folder->parentid = "0"; 
     807//            $folder->displayname = "Drafts"; 
     808//            $folder->type = SYNC_FOLDER_TYPE_DRAFTS; 
     809//        } 
     810//        else if($lid == "trash") { 
     811//            $folder->parentid = "0"; 
     812//            $folder->displayname = "Trash"; 
     813//            $folder->type = SYNC_FOLDER_TYPE_WASTEBASKET; 
     814//            $this->wasteID = $id; 
     815//        } 
     816//        else if($lid == "sent" || $lid == "sent items" || $lid == IMAP_SENTFOLDER) { 
     817//            $folder->parentid = "0"; 
     818//            $folder->displayname = "Sent"; 
     819//            $folder->type = SYNC_FOLDER_TYPE_SENTMAIL; 
     820//            //$this->sentID = $id; 
     821//        } 
    822822        // courier-imap outputs and cyrus-imapd outputs 
    823         else if($lid == "inbox.drafts" || $lid == "inbox/drafts") { 
     823        //else if(  $lid == "inbox.drafts" || $lid == "inbox/drafts") { 
     824        else if(  $lid == IMAP_DRAFTFOLDER ) { 
    824825            $folder->parentid = $this->convertImapId($fhir[0]); 
    825826            $folder->displayname = "Drafts"; 
    826827            $folder->type = SYNC_FOLDER_TYPE_DRAFTS; 
    827828        } 
    828         else if($lid == "inbox.trash" || $lid == "inbox/trash") { 
     829        else if($lid == IMAP_TRASHFOLDER) { 
    829830            $folder->parentid = $this->convertImapId($fhir[0]); 
    830831            $folder->displayname = "Trash"; 
     
    832833            $this->wasteID = $id; 
    833834        } 
    834         else if($lid == "inbox.sent" || $lid == "inbox/sent") { 
     835        else if($lid == IMAP_SENTFOLDER ) { 
    835836            $folder->parentid = $this->convertImapId($fhir[0]); 
    836837            $folder->displayname = "Sent"; 
  • trunk/zpush/config.php

    r7670 r7706  
    302302    // copy outgoing mail to this folder. If not set z-push will try the default folders 
    303303    define('IMAP_SENTFOLDER', 'INBOX' . $row['imapdelimiter'] . $row['imapdefaultsentfolder']); 
     304    define('IMAP_TRASHFOLDER', 'INBOX' . $row['imapdelimiter'] . $row['imapdefaulttrashfolder']); 
     305    define('IMAP_DRAFTFOLDER', 'INBOX' . $row['imapdelimiter'] . $row['imapdefaultdraftsfolder']); 
     306    define('IMAP_SPANFOLDER', 'INBOX' . $row['imapdelimiter'] . $row['imapdefaultspamfolder']); 
     307 
    304308    // forward messages inline (default false - as attachment) 
    305309    define('IMAP_INLINE_FORWARD', false); 
Note: See TracChangeset for help on using the changeset viewer.