From: Jan Schneider Date: Tue, 15 Jun 2010 10:17:11 +0000 (+0200) Subject: [jan] Fix filtering only unseen message if rule should filter all messages in X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ac2de5be025256de7a2eec40b1662ed0e9c87699;p=horde.git [jan] Fix filtering only unseen message if rule should filter all messages in IMAP driver (Jan Kuipers , Bug #9077). --- diff --git a/ingo/docs/CHANGES b/ingo/docs/CHANGES index 200d2945d..a7f269cbc 100644 --- a/ingo/docs/CHANGES +++ b/ingo/docs/CHANGES @@ -10,7 +10,8 @@ v2.0-git v1.2.5-cvs ---------- - +[jan] Fix filtering only unseen message if rule should filter all messages in + IMAP driver (Jan Kuipers , Bug #9077). ------ diff --git a/ingo/lib/Script/Imap.php b/ingo/lib/Script/Imap.php index a8a1425ed..b9f80652b 100644 --- a/ingo/lib/Script/Imap.php +++ b/ingo/lib/Script/Imap.php @@ -374,7 +374,10 @@ class Ingo_Script_Imap extends Ingo_Script { $ob = new Horde_Imap_Client_Search_Query(); $ob->flag('\\deleted', false); - $ob->flag('\\seen', $params['filter_seen'] == Ingo_Script::FILTER_SEEN); + if ($params['filter_seen'] == Ingo_Script::FILTER_SEEN || + $params['filter_seen'] == Ingo_Script::FILTER_UNSEEN) { + $ob->flag('\\seen', $params['filter_seen'] == Ingo_Script::FILTER_SEEN); + } return $ob; }