Changeset 1608 for trunk/expressoMail1_2
- Timestamp:
- 11/09/09 16:05:50 (14 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 4 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 } -
trunk/expressoMail1_2/inc/hook_settings.inc.php
r1605 r1608 153 153 '40' => lang('big') 154 154 ); 155 156 $default = array( 157 '50' => '50', 158 '100' => '100', 159 '150' => '150', 160 '200' => '200', 161 '300' => '300', 162 '400' => '400', 163 '65536' => lang('unlimited') 164 ); 165 166 create_select_box('What is the maximum number of results in an e-mail search?','search_result_number',$default,''); 155 167 156 168 create_select_box('What is the height of the lines in the list of messages?','line_height',$default,''); -
trunk/expressoMail1_2/index.php
r1526 r1608 70 70 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto'] : "0"; 71 71 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital'] : "0"; 72 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['search_result_number'] : "50"; 72 73 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['num_max_certs_to_cipher'] = $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] ? $GLOBALS['phpgw_info']['server']['num_max_certs_to_cipher'] : "10"; 73 74 $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_cripto'] : "0"; -
trunk/expressoMail1_2/js/search.js
r1604 r1608 789 789 } 790 790 if((data == "none") && (countTmp.length==0)){alert(get_lang("None result was found."));} 791 else if(countTmp.length > 50){alert(get_lang("More than %1 results. Please, try to refine your search.",50));} 792 else if(data == "many results"){alert(get_lang("More than %1 results. Please, try to refine your search.",50));} 793 else{EsearchE.mount_result((data=='none')?tmp:(countTmp.length==0)?data:data+tmp);} 791 if (preferences.search_result_number == '65536' || (data != 'many results' && countTmp.length < preferences.search_result_number)) 792 { 793 EsearchE.mount_result((data=='none')?tmp:(countTmp.length==0)?data:data+tmp); 794 } 795 else if (data == 'many results' || countTmp.length >= preferences.search_result_number) 796 { 797 alert(get_lang("More than %1 results. Please, try to refine your search.",preferences.search_result_number)); 798 } 794 799 } 795 800 var args = "$this.imap_functions.search_msg";
Note: See TracChangeset
for help on using the changeset viewer.