Changeset 7644


Ignore:
Timestamp:
12/12/12 10:37:14 (7 years ago)
Author:
cristiano
Message:

Ticket #3209 - Adicionado suporte de imagens nos contatos, Desabilitados Contas compartilhadas no email

Location:
trunk/zpush/backend/expresso
Files:
3 edited

Legend:

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

    r7589 r7644  
    1010    var $providerInstances; 
    1111    var $providersFolderMap; 
    12  
    1312    var $sendMailProvider = 'Imap'; 
     13    var $cacheFolders = array(); 
    1414 
    1515    function __construct() 
     
    2626        foreach($this->providers as $provider) 
    2727        { 
    28             $folders =  $this->providerInstances[$provider]->GetFolderList(); 
    29             foreach($folders as $folder) 
     28            if(!isset($this->cacheFolders[$provider])) 
     29                $this->cacheFolders[$provider] =  $this->providerInstances[$provider]->GetFolderList(); 
     30 
     31            foreach($this->cacheFolders[$provider] as $folder) 
    3032            { 
    3133                if($folder['id'] == $folderId) 
     
    3335            } 
    3436        } 
    35         //Log de erro; 
    3637    } 
    3738 
  • trunk/zpush/backend/expresso/providers/contactProvider.php

    r7633 r7644  
    169169            if ($result_contact == FALSE) throw new Exception(pg_last_error($this->db)); 
    170170            while ($row_contact = pg_fetch_row($result_contact)) { 
    171                 //if(isset($row_contact[3])) { 
    172                 //      $message->picture = base64_encode($row_contact[3]); 
    173                 //} 
     171                if(isset($row_contact[3]) && $row_contact[3] ) { 
     172                    $message->picture = base64_encode(pg_unescape_bytea( $row_contact[3]) ); 
     173                } 
    174174                if(isset($row_contact[4])) { 
    175175                    $message->nickname = utf8_encode($row_contact[4]); 
     
    596596 
    597597            // Incluir/Alterar registro na tabela phpgw_cc_contact no Banco de Dados 
    598             //if(isset($message->picture)) { 
    599             //  $arrayContact["photo"] = base64_decode($message->picture); 
    600             //} 
     598            if(isset($message->picture) && $message->picture) { 
     599                $arrayContact["photo"] = base64_decode($message->picture); 
     600            } 
    601601            if(isset($message->nickname)) { 
    602602                $arrayContact["alias"] = utf8_decode($message->nickname); 
  • trunk/zpush/backend/expresso/providers/imapProvider.php

    r7629 r7644  
    690690        $folders = array(); 
    691691 
    692         $list = @imap_getmailboxes($this->mbox, $this->server, "*"); 
     692        $list = @imap_getmailboxes($this->mbox, $this->server, "INBOX*"); 
    693693        if (is_array($list)) { 
    694694            // reverse list to obtain folders in right order 
Note: See TracChangeset for help on using the changeset viewer.