| | |
| | | { |
| | | $results = array(); |
| | | foreach ($criteria as $crit) |
| | | $results = array_merge($results, $this->search($mbox_name, $crit, $str, $charset)); |
| | | if ($search_result = $this->search($mbox_name, $crit, $str, $charset)) |
| | | $results = array_merge($results, $search_result); |
| | | |
| | | $results = array_unique($results); |
| | | $this->set_search_set($criteria, $str, $results, $charset); |
| | |
| | | |
| | | |
| | | /** |
| | | * Return a flat array with references to all parts, indexed by part numbmers |
| | | * Return a flat array with references to all parts, indexed by part numbers |
| | | * |
| | | * @param object Message body structure |
| | | * @return Array with part number -> object pairs |
| | |
| | | $start_index = 100000; |
| | | foreach ($a_uids as $uid) |
| | | { |
| | | $index = array_search($uid, $a_cache_index); |
| | | $start_index = min($index, $start_index); |
| | | if (($index = array_search($uid, $a_cache_index)) !== FALSE) |
| | | $start_index = min($index, $start_index); |
| | | } |
| | | |
| | | // clear cache from the lowest index on |