summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-06-08 17:45:09 +0000
committeralecpl <alec@alec.pl>2009-06-08 17:45:09 +0000
commit384d83adb9641cfcb5365b25706c89cee8e688de (patch)
tree2f2fc115d3ccac5852b4ce01dbc4d0e7d1669637 /program
parentec5d2e78a4fe87ea53f492751963e7c927c73f74 (diff)
- make searching aware of 'skip_deleted'
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 7b24d2307..5130cd280 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -1006,6 +1006,9 @@ class rcube_imap
*/
function _search_index($mailbox, $criteria='ALL', $charset=NULL, $sort_field=NULL)
{
+ if ($this->skip_deleted && !preg_match('/UNDELETED/', $criteria))
+ $criteria = 'UNDELETED '.$criteria;
+
if ($sort_field && $this->get_capability('sort'))
{
$charset = $charset ? $charset : $this->default_charset;