| | |
| | | return $this->get_search_set(); |
| | | } |
| | | |
| | | /** |
| | | * Flag certain result subsets as 'incomplete'. |
| | | * For subsequent refresh_search() calls to only refresh the updated parts. |
| | | */ |
| | | protected function set_search_dirty($folder) |
| | | { |
| | | if ($this->search_set && is_a($this->search_set, 'rcube_result_multifolder')) { |
| | | if ($subset = $this->search_set->get_set($folder)) { |
| | | $subset->incomplete = $this->search_set->incomplete = true; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Return message headers object of a specific message |
| | |
| | | $this->clear_message_cache($folder, $all_mode ? null : explode(',', $uids)); |
| | | } |
| | | } |
| | | |
| | | $this->set_search_dirty($folder); |
| | | } |
| | | |
| | | return $result; |
| | |
| | | if ($moved) { |
| | | $this->clear_messagecount($from_mbox); |
| | | $this->clear_messagecount($to_mbox); |
| | | |
| | | $this->set_search_dirty($from_mbox); |
| | | $this->set_search_dirty($to_mbox); |
| | | } |
| | | // moving failed |
| | | else if ($to_trash && $config->get('delete_always', false)) { |
| | |
| | | if ($this->search_threads || $all_mode) { |
| | | $this->refresh_search(); |
| | | } |
| | | else { |
| | | else if (!$this->search_set->incomplete) { |
| | | $this->search_set->filter(explode(',', $uids), $this->folder); |
| | | } |
| | | } |
| | |
| | | // unset threads internal cache |
| | | unset($this->icache['threads']); |
| | | |
| | | $this->set_search_dirty($folder); |
| | | |
| | | // remove message ids from search set |
| | | if ($this->search_set && $folder == $this->folder) { |
| | | // threads are too complicated to just remove messages from set |
| | | if ($this->search_threads || $all_mode) { |
| | | $this->refresh_search(); |
| | | } |
| | | else { |
| | | else if (!$this->search_set->incomplete) { |
| | | $this->search_set->filter(explode(',', $uids)); |
| | | } |
| | | } |