From 0a17b9efe7fadffb5d9ae601744a84f06fa622fc Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 6 Oct 2011 12:46:00 +0800 Subject: [PATCH] NotifyAction.php --- NotifyAction.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/NotifyAction.php b/NotifyAction.php index 2e5b4689..09d9a04f 100644 --- a/NotifyAction.php +++ b/NotifyAction.php @@ -63,15 +63,20 @@ class Pman_Core_NotifyAction extends Pman $n->autoJoin(); $ar = $n->fetchAll(); + $done = array(); + foreach($ar as $n) { $nc = clone($n); $nc->sent = date('Y-m-d H:i:s'); $nc->update($n); - // add an event????? - yeap... - $this->addEventOnce($_POST['action'],$n->object()); - - + // add an event????? - yeap... only once per object + $key = implode(':', array($nc->ontable,$nc->onid)); + if (!isset($done[$key])) { + + $e = $this->addEvent($_POST['action'],$n->object()); + } + $done[$key] = true; } $this->jok("updated"); -- 2.39.2