X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_notify.php;h=fe84b84b082484c1bebf42f13c084ea8c50cf3cc;hb=f9ca0f667022abedbecc3ea1d579f21a4219411d;hp=211c5ec94fc12874820dd0d1e718463e896dec2b;hpb=f6e297a41b289df86b66eb2837a3af5195cf78aa;p=Pman.Core diff --git a/DataObjects/Core_notify.php b/DataObjects/Core_notify.php index 211c5ec9..fe84b84b 100644 --- a/DataObjects/Core_notify.php +++ b/DataObjects/Core_notify.php @@ -110,6 +110,16 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject return !empty($this->msgid); } + function whereAddDeliveryStatus($delivered = false) + { + $tn = $this->tableName(); + 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.. { switch($this->event_id) { @@ -136,10 +146,10 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject // then we can build a join.. $d = DB_DataObject::Factory($q['ontable']); $ji = $d->autoJoin(); - echo '
';print_R($hi);
+            //echo '
';print_R($ji);
             // get cols
-            foreach($ji['cols'] as $cname=>$fname) {
-                //$this->selectAdd($fname . ' as ontable_id_' . $cname );
+            foreach($ji['join_names'] as $cname=>$fname) {
+                 $this->selectAdd($fname . ' as ontable_id_' . $cname );
             }
             
             //$this->selectAdd($d->_query['data_select']); -- this will cause the same dataIndex...