summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_imap.php')
-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;