diff --git a/backend/imap/imap.php b/backend/imap/imap.php index 3889f057..1259c2d6 100644 --- a/backend/imap/imap.php +++ b/backend/imap/imap.php @@ -1985,7 +1985,7 @@ private function getSearchRestriction($cpo) { $searchLess = strftime("%Y-%m-%d", strtotime($cpo->GetSearchValueLess())); $filter = ''; - if ($searchGreater != '') { + if ($cpo->GetSearchValueGreater() != '') { $filter .= ' SINCE "' . $searchGreater . '"'; } else { // Only search in sync messages @@ -2022,7 +2022,7 @@ private function getSearchRestriction($cpo) { $filter .= ' SINCE "' . ($limitdate->format("d M Y")) . '"'; } } - if ($searchLess != '') { + if ($cpo->GetSearchValueLess() != '') { $filter .= ' BEFORE "' . $searchLess . '"'; }