From f9ca0f667022abedbecc3ea1d579f21a4219411d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 5 Aug 2013 17:39:59 +0800 Subject: [PATCH] DataObjects/Core_notify.php --- DataObjects/Core_notify.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/DataObjects/Core_notify.php b/DataObjects/Core_notify.php index b3eaf7b0..fe84b84b 100644 --- a/DataObjects/Core_notify.php +++ b/DataObjects/Core_notify.php @@ -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.. -- 2.39.2