DataObjects/Core_notify.php
authorAlan Knowles <alan@roojs.com>
Mon, 5 Aug 2013 09:39:59 +0000 (17:39 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 5 Aug 2013 09:39:59 +0000 (17:39 +0800)
DataObjects/Core_notify.php

index b3eaf7b..fe84b84 100644 (file)
@@ -110,10 +110,14 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject
         return !empty($this->msgid);
     }
     
-    function whereAddUndelivered()
+    function whereAddDeliveryStatus($delivered = false)
     {
         $tn = $this->tableName();
-        $this->whereAdd("$tn.msgid IS NULL OR $tn.msgid = ''");
+        if ($delivered) {
+            $this->whereAdd("$tn.msgid IS NOT NULL AND $tn.msgid != ''");
+        } else {
+            $this->whereAdd("$tn.msgid IS NULL OR $tn.msgid = ''");    
+        }
     }
     
     function status() // used by commandline reporting at present..