Changeset 6641 for trunk/prototype


Ignore:
Timestamp:
06/26/12 14:59:52 (12 years ago)
Author:
acoutinho
Message:

Ticket #2906 - Verificar mensagem de erro ao usuario durante sinalizacao de mensagens

Location:
trunk/prototype
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/prototype/modules/mail/interceptors/Helpers.php

    r6566 r6641  
    206206                 
    207207                if(empty($params['messageId']))  
    208                 {  
    209                         throw new Exception('#FollowupflagMessageIdError'); 
    210                 }else{  
    211                  
    212                         $params = Controller::create($imap_uri, $params); 
    213                 } 
     208                    throw new Exception('#FollowupflagMessageIdError'); 
     209                else  
     210                    $params = Controller::create($imap_uri, $params); 
     211 
    214212                if (!$params) 
    215                         throw new Exception('#FollowupflagParamsError'); 
     213                    throw new Exception('#FollowupflagLimitError'); 
    216214        } 
    217215         
     
    222220                 * deste interceptor. 
    223221                 */ 
     222                 
     223            
     224             
     225             
    224226                if ($original['URI']['service'] == 'PostgreSQL') return $result; 
    225227                 
     
    267269        //followupflagged:PostgreSQL.after.find 
    268270        public function doImapFind( &$uri , &$result , &$criteria , $original ){ 
    269  
    270                 $imap_uri = $uri; 
     271             
     272                $imap_uri = $uri; 
    271273                $imap_uri['service'] = 'Imap'; 
    272274                $imap_criteria = $original['criteria']; 
     
    311313                 * Faz a consistência do banco com o imap 
    312314                 */ 
    313                  /* 
     315                /* 
    314316                if ($result) { 
    315317                        $idList = array(); 
  • trunk/prototype/modules/mail/js/followupflag.js

    r6487 r6641  
     1MsgsCallbackFollowupflag = { 
     2 
     3    '#FollowupflagMessageIdError': function(){ 
     4        alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: mensagem não contém o atributo message-id.'); 
     5    }, 
     6    '#FollowupflagLimitError': function(){ 
     7        alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: limite de flags atingido para esta pasta.'); 
     8    }, 
     9    '#FollowupflagParamsError': function(){ 
     10        alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: mensagem não contém todos os atributos necessários.'); 
     11    } 
     12     
     13} 
     14 
    115function updateCacheFollowupflag(msgNumber, msgFolder, op){ 
    216        if(op){ 
  • trunk/prototype/modules/mail/js/label.js

    r6566 r6641  
    127127                                var hasLabel = true; 
    128128                                $.each(data, function(index, value) { 
    129                                         if(typeof value == 'object'){ 
    130                                                 hasLabel = false; 
    131                                         } 
    132                                         else { 
    133                                                 hasLabel = value; 
    134                                         } 
     129                                         
     130                                        hasLabel = typeof value == 'object' ? false : value; 
     131                                         
    135132                                }); 
    136133                                         
  • trunk/prototype/services/ImapServiceAdapter.php

    r6576 r6641  
    538538                                         
    539539                                        $data['messageId'] = $headers[0]->message_id; 
    540                                                          
    541  
    542                                         return ($s) ? $data : array(); 
     540                                         
     541                                        /* 
     542                                         * TODO 
     543                                         * Verificar erro ao tentar setar uma flag com o limite de flags atingido 
     544                                         * onde o status retornado pelo imap_setflag_full é true mesmo não sendo possível 
     545                                         * a inserção da flag. 
     546                                         */ 
     547 
     548                                        return (($s) && (imap_last_error() != 'Too many user flags in mailbox')) ? $data : array(); 
    543549 
    544550                                } else if (isset($data['messageId'])) { 
Note: See TracChangeset for help on using the changeset viewer.