Ignore:
Timestamp:
01/26/11 11:10:08 (13 years ago)
Author:
eduardoalex
Message:

Ticket #1392 - Corrigindo a busca por mensagens com ## e -- no assunto

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php

    r3709 r3722  
    34263426                                        imap_reopen($mbox_stream, "{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".$name_box); 
    34273427 
    3428                                 if (preg_match("/^.?\bALL\b/", $filter)){ // Quick Search, note: this ALL isn't the same ALL from imap_search 
     3428                if (preg_match("/^.?\bALL\b/", $filter)){ // Quick Search, note: this ALL isn't the same ALL from imap_search 
    34293429 
    34303430                                        $all_criterias = array ("TO","SUBJECT","FROM","CC"); 
     
    34393439                                                { 
    34403440                                                        foreach($search_criteria as $new_search){ 
    3441                                                                 if ($search_result_number != '65536' && $sum == $search_result_number) 
    3442                                                                 { 
    3443                                                                   return $retorno ? $sum . "=sumResults=" . $retorno : "none"; 
    3444                                                                 } 
     3441                                if ($search_result_number != '65536' && $sum == $search_result_number) 
     3442                                { 
     3443                                  return $retorno ? $sum . "=sumResults=" . $retorno : "none"; 
     3444                                } 
    34453445 
    34463446                                                                $m_token = trim("##". mb_convert_encoding( $folder_name, "ISO_8859-1", "UTF7-IMAP" ) . "--" . mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--".$new_search."##"."\n"); 
    34473447                                                                if(!@strstr($retorno,$m_token)) 
    3448                                                                 { 
    3449                                                                     $retorno .= $m_token; 
    3450                                                                     $sum++; 
    3451                                                                 } 
     3448                                { 
     3449                                    $retorno .= $m_token; 
     3450                                    $sum++; 
     3451                                } 
    34523452                                                        } 
    34533453                                                } 
     
    35403540                if($header->from[0]->personal != "") 
    35413541                        $from = $header->from[0]->personal; 
    3542                 $ret_msg = $this->decode_string($from) . "--" . $subject . "--". gmdate("d/m/Y",$header ->udate + $this->functions->CalculateDateOffset())."--". $this->size_msg($header->Size) ."--". $flag; 
     3542                $ret_msg = $this->decode_string($from) . "--" . htmlentities(rawurlencode($subject)) . "--". gmdate("d/m/Y",$header ->udate + $this->functions->CalculateDateOffset())."--". $this->size_msg($header->Size) ."--". $flag; 
    35433543                return $ret_msg; 
    35443544        } 
Note: See TracChangeset for help on using the changeset viewer.