- Timestamp:
- 09/30/11 14:25:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/expressoMail1_2/inc/class.imap_functions.inc.php
r5106 r5107 3384 3384 } 3385 3385 3386 function ac_search($params) 3387 { 3388 include("class.imap_attachment.inc.php"); 3389 $imap_attachment = new imap_attachment(); 3390 $criterias = array ("TO","SUBJECT","FROM","CC"); 3391 $return = array(); 3392 $folders = $this->get_folders_list(); 3393 $num_msgs = 0; 3394 3395 foreach($folders as $id =>$folder) 3396 { 3397 if(strpos($folder['folder_id'],'user')===false && is_array($folder)) { 3398 foreach($criterias as $criteria_fixed) 3399 { 3400 $_filter = $criteria_fixed . ' "'.$params['filter'].'"'; 3401 $mbox_stream = $this->open_mbox($folder['folder_name']); 3402 3403 $messages = imap_search($mbox_stream, $_filter, SE_UID); 3404 3405 if ($messages == ''){ 3406 if($mbox_stream) 3407 imap_close($mbox_stream); 3408 continue; 3409 } 3410 3411 foreach($messages as $msg_number) 3412 { 3413 $temp = $this->get_info_head_msg($msg_number); 3414 if(!$temp) 3415 return false; 3416 3417 $return[$num_msgs] = $temp; 3418 $num_msgs++; 3419 } 3420 $return['num_msgs'] = $num_msgs; 3421 3422 if($mbox_stream) 3423 imap_close($mbox_stream); 3424 } 3425 } 3426 3427 } 3428 return $return; 3429 } 3386 3430 3387 3431 function mobile_search($params)
Note: See TracChangeset
for help on using the changeset viewer.