From 1bedea1b9e0573de45ab2da4e3ecfa120585bba6 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 6 Apr 2011 23:08:52 +0800 Subject: [PATCH] NotifySend.php --- NotifySend.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NotifySend.php b/NotifySend.php index 0f79f71f..f2177043 100644 --- a/NotifySend.php +++ b/NotifySend.php @@ -45,6 +45,18 @@ class Pman_Core_NotifySend extends Pman $o = $w->object(); $p = $w->person(); + // let's work out the last notification sent to this user.. + $l = DB_DataObject::factory($this->table); + $l->setFrom($w->toArray()); + unset($l->sent); + unset($l->act_when); + $l->whereAdd('id != '. $w->id); + $l->orderBy('sent DESC'); + $l->limit(1); + $ar = $l->fetchAll('sent'); + $last = empty($ar) ? date('Y-m-d H:i:s', 0) : $ar['sent']; + + $email = $o->toEmail($p,) // should we fetch the watch that caused it.. - which should contain the method to call.. -- 2.39.2