Changeset 1608 for trunk/expressoMail1_2/inc/class.imap_functions.inc.php
- Timestamp:
- 11/09/09 16:05:50 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r1586 r1608 2967 2967 if($search){ 2968 2968 $search_criteria = ''; 2969 $search_result_number = $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_result_number']; 2970 $acumulated_results = 0; 2969 2971 foreach($search as $tmp) 2970 2972 { 2971 2973 $tmp1 = explode("##",$tmp); 2972 2974 $name_box = $tmp1[0]; 2973 2975 unset($filter); 2974 2976 foreach($tmp1 as $index => $criteria) … … 2998 3000 imap_reopen($mbox_stream, "{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".$name_box); 2999 3001 3002 $sum = 0; 3000 3003 if (preg_match("/^.?\bALL\b/", $filter)){ // Quick Search, note: this ALL isn't the same ALL from imap_search 3001 3004 … … 3007 3010 $search_criteria = imap_search($mbox_stream, $_filter, SE_UID); 3008 3011 3009 if($search_criteria 3012 if($search_criteria) //&& count($search_criteria) < 50) 3010 3013 { 3011 3014 foreach($search_criteria as $new_search){ 3012 3015 $m_token = trim("##".mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--".$new_search."##"."\n"); 3013 3016 if(!@strstr($retorno,$m_token)) 3014 $retorno .= $m_token; 3017 { 3018 $retorno .= $m_token; 3019 $sum += 1; 3020 } 3015 3021 } 3016 3022 } 3017 else if(count($search_criteria) >= 50)3018 return "many results";3019 3023 } 3020 3024 } 3021 3025 else { 3022 $search_criteria = imap_search($mbox_stream, $filter, SE_UID); 3023 if( is_array( $search_criteria) ) 3024 { 3025 foreach($search_criteria as $new_search) 3026 $retorno .= trim("##".mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--" . $new_search."##"."\n"); 3027 } 3028 } 3026 $search_criteria = imap_search($mbox_stream, $filter, SE_UID); 3027 if( is_array( $search_criteria) ) 3028 { 3029 foreach($search_criteria as $new_search) 3030 $retorno .= trim("##".mb_convert_encoding( $name_box, "ISO_8859-1", "UTF7-IMAP" ) . "--" . $this->get_msg($new_search,$name_box,$mbox_stream) . "--" . $new_search."##"."\n"); 3031 } 3032 $sum += count($search_criteria); 3033 } 3034 3035 $acumulated_results += $sum; 3036 3037 if ($search_result_number != '65536' && $acumulated_results >= $search_result_number) 3038 { 3039 return "many results"; 3040 } 3029 3041 } 3030 3042 }
Note: See TracChangeset
for help on using the changeset viewer.