// on_table,
// action(eg. APPROVAL)
// on_id (comma delimited.)
- DB_DataObject::debugLevel(1);
+ //DB_DataObject::debugLevel(1);
$n = DB_DataObject::factory('core_notify');
$n->person_id = $this->authUser->id;
// in theory in workflow, this could trigger another action...
$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?????
+ // 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");
}