* @param int $onid - the id of the row changed
* @param string $whereAdd (optiona) - a DB whereAdd() condition to filter the search for watches
* @param datetime $when (default now) - date/time to create the notification for (Eg. end of day..)
* @param int $onid - the id of the row changed
* @param string $whereAdd (optiona) - a DB whereAdd() condition to filter the search for watches
* @param datetime $when (default now) - date/time to create the notification for (Eg. end of day..)
- function notify($ontable , $onid, $whereAdd = false, $when=false)
+ function notify($ontable , $onid, $whereAdd = false, $when=false, $to_ontable=false, $to_onid=false)
// see if there are any watches on events..
// notify everyone flagged except the person doing it...
// this is very basic logic... -
// see if there are any watches on events..
// notify everyone flagged except the person doing it...
// this is very basic logic... -
-
- $w->whereAdd('person_id != '. (int) $event->person_id);
+ // not sure why this is here... - it breaks on the reader article ->
+ if ($event->person_id) {
+ $w->whereAdd('person_id != '. (int) $event->person_id);
+ }
$n->trigger_event_id = $event->id;
$n->person_id = $watch->person_id;
$n->watch_id = $watch->id;
$n->trigger_event_id = $event->id;
$n->person_id = $watch->person_id;
$n->watch_id = $watch->id;