Changeset 6860 for trunk


Ignore:
Timestamp:
07/24/12 10:27:50 (12 years ago)
Author:
marcosw
Message:

Ticket #2947 - Merge do branch das novas funcionalidades para o trunk

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.exporteml.inc.php

    r5934 r6860  
    1616        var $mbox_stream; 
    1717        var $tempDir; 
    18          
     18 
    1919        function ExportEml() { 
    2020            
     
    5050                return $sEMail; 
    5151        } 
    52          
     52 
    5353        // create EML File. 
    5454        // Funcao alterada para tratar a exportacao 
     
    6262            $header    = imap_headerinfo($this->mbox_stream, imap_msgno($this->mbox_stream, $id), 80, 255); 
    6363            $subject = $this->decode_subject($header->fetchsubject); 
    64              
     64                         
    6565            if (strlen($subject) > 60) 
    6666                $subject = substr($subject, 0, 59); 
     
    214214                // se encontram em um mesmo folder 
    215215                if (count($sorted_msgs)==1){ 
    216                                                          
    217216                        $array_names_keys = array_keys($sorted_msgs); 
    218217                        $this->folder = mb_convert_encoding($array_names_keys[0], "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP"); 
     
    228227                                $fileName       = $this->CreateFileEml($sEMLData, $tempDir, $msg_number[0]."_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]); 
    229228                 
    230                                  
     229                                $header    = imap_headerinfo($this->mbox_stream, imap_msgno($this->mbox_stream, $msg_number[0]), 80, 255); 
     230                $subject = $this->decode_subject(html_entity_decode($header->fetchsubject)); 
     231 
    231232                                imap_close($this->mbox_stream); 
    232233                                if (!$fileName) { 
    233234                                        return false; 
    234235                                }else{ 
    235                                         return $tempDir.'/'.$fileName; 
     236                                        $return = array(); 
     237                                        $return[] = $tempDir.'/'.$fileName; 
     238                                        $return[] = $subject; 
     239                                        return $return; 
    236240                                } 
    237241                        } 
     
    271275                        } 
    272276 
    273                         return $file; 
     277                        return $file;                    
    274278                 
    275279                //exporta mensagens de diferentes pastas 
     
    362366                                $file = false; 
    363367                        } 
    364  
    365368            return $file; 
    366369                 
     
    369372                { 
    370373                        $this-> folder = $params['folder']; 
    371                                 $this->folder = mb_convert_encoding($this->folder, "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP"); 
     374                        $this->folder = mb_convert_encoding($this->folder, "UTF7-IMAP","UTF-8, ISO-8859-1, UTF7-IMAP"); 
    372375                        $array_ids = explode(',', $params['msgs_to_export']); 
    373376                        $error = False; 
     
    383386                                $sEMLData       = $this->parseEml($header, $body);                      
    384387                                $fileName       = $this->CreateFileEml($sEMLData, $tempDir, $array_ids[0]."_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]); 
     388                         
     389                                $header    = imap_headerinfo($this->mbox_stream, imap_msgno($this->mbox_stream, $array_ids[0]), 80, 255); 
     390                    $subject = $this->decode_subject(html_entity_decode($header->fetchsubject)); 
    385391 
    386392                                imap_close($this->mbox_stream); 
     
    388394                                        return false; 
    389395                                } else { 
    390                                         return $tempDir.'/'.$fileName; 
     396                                        $return = array(); 
     397                                        $return[] = $tempDir.'/'.$fileName; 
     398                                        $return[] = $subject; 
     399                                        return $return; 
    391400                                } 
    392401                        } 
     
    424433                                $file = false; 
    425434                        } 
    426  
    427435                        return $file; 
    428436                } 
     
    453461                        $fileName       = $this->CreateFileEml($sEMLData, $tempDir, $array_ids[0]."_".$_SESSION[ 'phpgw_session' ][ 'session_id' ]); 
    454462 
     463                        $header    = imap_headerinfo($this->mbox_stream, imap_msgno($this->mbox_stream, $array_ids[0]), 80, 255); 
     464            $subject = $this->decode_subject(html_entity_decode($header->fetchsubject)); 
     465 
    455466                        imap_close($this->mbox_stream); 
    456467                        if (!$fileName) { 
    457468                                return false; 
    458469                        } else { 
    459                                 return $tempDir.'/'.$fileName; 
     470                                $return = array(); 
     471                                $return[] = $tempDir.'/'.$fileName; 
     472                                $return[] = $subject; 
     473                                return $return; 
    460474                        } 
    461475                } 
  • trunk/expressoMail1_2/js/common_functions.js

    r6707 r6860  
    825825        var num_msg = id_msg.substr(0,(id_msg.length - 2)); 
    826826        var handler_source = function(data){ 
    827                 download_attachments(null, null, data, null,null,'fonte_da_mensagem.eml'); 
     827                download_attachments(null, null, data[0], null,null,data[1]+'.eml'); 
    828828        } 
    829829        cExecute("$this.exporteml.export_msg",handler_source,"folder="+url_decode(folder)+"&msgs_to_export="+num_msg); 
  • trunk/expressoMail1_2/js/main.js

    r6856 r6860  
    534534                                        var confNotification = confirm(get_lang("The sender:\n%1\nwaits your notification of reading. Do you want to confirm this?",Base64.decode(msg_info.DispositionNotificationTo)), ""); 
    535535 
    536                         if (confNotification) 
    537                                 cExecute ("$this.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&date="+msg_info.udate+"&subject="+url_encode(msg_info.subject), handler_sendNotification); 
     536                        if (confNotification) { 
     537                        /* Adequação a nova funcionalidade. Agora, a confirmação de leitura é uma preferência do usuário. */ 
     538                                if(preferences.confirm_read_message) { 
     539                                        $.Zebra_Dialog(get_lang("Would you like to send the read receipt?"), { 
     540                                                'type':     'question', 
     541                                                'title':    get_lang('Read receipt'), 
     542                                                'buttons':  [get_lang("Yes"), get_lang("No")], 
     543                                                'overlay_opacity' : 0.5, 
     544                                                'onClose':  function(caption) { 
     545                                                        if(caption == get_lang("Yes")) 
     546                                                                cExecute ("$this.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&date="+msg_info.udate+"&subject="+url_encode(msg_info.subject), handler_sendNotification);                                                               
     547                                                        else  
     548                                                                write_msg(get_lang("Confirmation message is not sent")); 
     549                                                } 
     550                                        }); 
     551                                } 
     552                                else 
     553                                        cExecute ("$this.imap_functions.send_notification&notificationto="+msg_info.DispositionNotificationTo+"&date="+msg_info.udate+"&subject="+url_encode(msg_info.subject), handler_sendNotification);                                                               
     554                        } 
     555                                 
    538556                } 
    539557                //Change msg class to read. 
     
    26892707        } 
    26902708        //stringEmail = content.find('[name="input_to"]').val(); 
     2709 
    26912710        var stringEmail = ""; 
    26922711        var stringToEmail = ""; 
     
    34913510                else{ 
    34923511                        var filename = 'mensagens.zip';  
    3493                         if (data.match(/\.eml$/gi)) {  
    3494                                 filename = 'fonte_da_mensagem.eml';  
     3512                        if (data[0].match(/\.eml$/gi)) {  
     3513                filename = data[1]+'.eml';  
    34953514                        }  
    34963515                        download_attachments(null, null, data, null,null,filename); 
     
    38693888                wfolders.makeWindow('null','import'); 
    38703889} 
    3871 function import_calendar(data){ 
    3872     var import_url = '$this.db_functions.import_vcard&msg_folder='+data; 
    3873     var logUser; 
    3874     var up; 
    3875     var owner; 
    3876      
    3877     //Verifica o contexto de importação 
    3878     var decodeOwner = function(){ 
    3879          
     3890 
     3891function decodeOwner(){ 
    38803892        owner = User.me.id; 
    38813893        var imapBox = openTab.imapBox[currentTab].split(cyrus_delimiter); 
     
    38833895            var user = DataLayer.get('user', {filter: ['=','uid',imapBox[1]]});              
    38843896            owner = $.isArray(user) ? user[0].id : user.id; 
    3885         } 
    3886          
     3897        }        
    38873898        return owner; 
    3888     } 
    3889      
     3899} 
     3900function import_calendar(data){ 
     3901    var import_url = '$this.db_functions.import_vcard&msg_folder='+data; 
     3902    var logUser; 
     3903    var up; 
     3904    var owner;    
    38903905    function handler_import_calendar(data){ 
    38913906            if(data === true){ 
  • trunk/prototype/modules/filters/interceptors/FilterMapping.php

    r6813 r6860  
    252252                                                $require_vacation = true; 
    253253                                                $action[$k]['parameter'] = "\"" . $action[$k]['parameter'] . "\""; 
    254                                                 $vacation_action = ' :subject "Fora do Escrit&oacuterio" ' . $action[$k]['parameter'] . ";"; 
     254                                                $vacation_action = ' :subject "Fora do Escritório" ' . $action[$k]['parameter'] . ";"; 
    255255                                                $vacation = true; 
    256256                                                continue; 
Note: See TracChangeset for help on using the changeset viewer.