From f12999ff98e18fc892dcc73277b24951a6ece178 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 11 Jun 2015 12:27:01 +0800 Subject: [PATCH] NotifySend.php --- NotifySend.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/NotifySend.php b/NotifySend.php index c7a3f8f6..247ac3d8 100644 --- a/NotifySend.php +++ b/NotifySend.php @@ -156,11 +156,14 @@ class Pman_Core_NotifySend extends Pman // let's work out the last notification sent to this user.. $l = DB_DataObject::factory($this->table); - $l->setFrom( array( + + $lar = array( 'ontable' => $w->ontable, 'onid' => $w->onid, - 'person_id' => $w->person_id, - )); + ); + $lar[strtolower($w->ontable).'_id'] = $w->{strtolower($w->ontable).'_id'}; + + $l->setFrom( $lar ); $l->whereAdd('id != '. $w->id); $l->orderBy('sent DESC'); $l->limit(1); -- 2.39.2