[jan] Fix filtering only unseen message if rule should filter all messages in
authorJan Schneider <jan@horde.org>
Tue, 15 Jun 2010 10:17:11 +0000 (12:17 +0200)
committerJan Schneider <jan@horde.org>
Tue, 15 Jun 2010 10:17:11 +0000 (12:17 +0200)
      IMAP driver (Jan Kuipers <jrkuipers@lauwerscollege.nl>, Bug #9077).

ingo/docs/CHANGES
ingo/lib/Script/Imap.php

index 200d294..a7f269c 100644 (file)
@@ -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 <jrkuipers@lauwerscollege.nl>, Bug #9077).
 
 
 ------
index a8a1425..b9f8065 100644 (file)
@@ -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;
     }