Ignore:
Timestamp:
12/07/12 18:05:13 (11 years ago)
Author:
cristiano
Message:

Ticket #3209 - Correcao da pasta enviados para pegar preferencia do usuario

File:
1 edited

Legend:

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

    r7589 r7629  
    8888        $this->mboxFolder = ""; 
    8989 
     90 
     91        $ldapConfig = parse_ini_file(EXPRESSO_PATH . '/prototype/config/OpenLDAP.srv' , true ); 
     92        $ldapConfig =  $ldapConfig['config']; 
     93        $sr = ldap_search( $GLOBALS['connections']['ldap'] , $ldapConfig['context'] , "(uid=$username)" , array('uidNumber'), 0 , 1 ); 
     94        if(!$sr) return false; 
     95 
     96        $entries = ldap_get_entries( $GLOBALS['connections']['ldap'] , $sr ); 
     97        $uidNumber = $entries[0]['uidnumber'][0]; 
     98 
     99 
     100        $rs = pg_query( $GLOBALS['connections']['db'], 'Select * FROM phpgw_preferences WHERE preference_owner IN (\'-2\',\'-1\',\''.$uidNumber.'\') AND preference_app = \'expressoMail\' ORDER BY preference_owner' ); 
     101 
     102        $results = array(); 
     103        while( $row = pg_fetch_assoc( $rs ) ) 
     104            $results[] = $row; 
     105 
     106        foreach($results as $result) 
     107        { 
     108            $ra = unserialize($result['preference_value']); 
     109            if(isset($ra['save_in_folder'])) 
     110            { 
     111                $this->sentID = $ra['save_in_folder']; 
     112                break; 
     113            } 
     114        } 
     115 
    90116        if ($this->mbox) { 
    91117            ZLog::Write(LOGLEVEL_INFO, sprintf("ExpressoImapProvider->Logon(): User '%s' is authenticated on IMAP",$username)); 
     
    737763            $folder->displayname = "Sent"; 
    738764            $folder->type = SYNC_FOLDER_TYPE_SENTMAIL; 
    739             $this->sentID = $id; 
     765            //$this->sentID = $id; 
    740766        } 
    741767        // courier-imap outputs and cyrus-imapd outputs 
     
    755781            $folder->displayname = "Sent"; 
    756782            $folder->type = SYNC_FOLDER_TYPE_SENTMAIL; 
    757             $this->sentID = $id; 
     783            //$this->sentID = $id; 
    758784        } 
    759785 
Note: See TracChangeset for help on using the changeset viewer.