Ignore:
Timestamp:
09/21/12 16:02:43 (12 years ago)
Author:
alexandrecorreia
Message:

Ticket #3093 - Merge do trunk( expresso 2.4 ) para o sandbox( expresso 2.4.3)

Location:
sandbox/2.4.3-expresso-rest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.4.3-expresso-rest

  • sandbox/2.4.3-expresso-rest/expressoMail1_2/inc/class.imap_functions.inc.php

    r7235 r7273  
    28342834            } else { 
    28352835                //Compatibilização com Outlook, ao encaminhar a mensagem 
    2836                 $body = mb_ereg_replace('<!--\[', '<!-- [', $params['body']); 
     2836                $body = mb_ereg_replace('<!--\[', '<!-- [', $params['body']);                            
     2837                                $body = str_replace("&lt;","&yzwkx;",$body); //Alterar as Entities padrão das tags < > para compatibilizar com o Expresso 
     2838                                $body = str_replace("&gt;","&xzwky;",$body); 
    28372839                $body = str_replace("%nbsp;","&nbsp;",$body); 
    28382840                //$body = preg_replace("/\n/"," ",$body); 
    28392841                //$body = preg_replace("/\r/","" ,$body); 
    28402842                $body = html_entity_decode ( $body, ENT_QUOTES , 'ISO-8859-1' );         
     2843                                $body = str_replace("&yzwkx;","&lt;",$body); 
     2844                                $body = str_replace("&xzwky;","&gt;",$body); 
    28412845            } 
    28422846 
     
    36413645        return $returns; 
    36423646} 
     3647    function verify_disposition_notification($msg){ 
     3648        $header = imap_fetchheader($this->mbox, $msg, FT_UID); 
     3649        $pattern = '/^[ \t]*Disposition-Notification-To:.*/mi'; 
     3650        if (preg_match($pattern, $header, $fields)) 
     3651            return true; 
     3652        else 
     3653            return false; 
     3654    } 
     3655 
    36433656        function set_messages_flag($params) 
    36443657        {                
     
    36673680                        $msgs = explode(",",$msgs_to_set); 
    36683681                        foreach($msgs as $men){ 
    3669                                 if (imap_setflag_full($this->mbox, $men, "\\Seen", ST_UID)) 
    3670                                         $return["msgs_to_set"] .= $men.","; 
    3671                                 else 
    3672                                         $return["msgs_not_to_set"] .= $men.","; 
     3682 
     3683                if($this->verify_disposition_notification($men)){ 
     3684 
     3685                    if(!array_key_exists('disposition_notification_to', $return)) 
     3686                        $return['disposition_notification_to'] = array(); 
     3687 
     3688                    $return["disposition_notification_to"][] = $men; 
     3689                }else{ 
     3690                    if (imap_setflag_full($this->mbox, $men, "\\Seen", ST_UID)) 
     3691                        $return["msgs_to_set"] .= $men.","; 
     3692                    else 
     3693                        $return["msgs_not_to_set"] .= $men.","; 
     3694                } 
    36733695                        } 
    36743696                        $return["status"] = true; 
Note: See TracChangeset for help on using the changeset viewer.