3 * Table Definition for core_watch
5 require_once 'DB/DataObject.php';
7 class Pman_Core_DataObjects_Core_watch extends DB_DataObject
10 /* the code below is auto generated do not remove the above tag */
12 public $__table = 'core_watch'; // table name
13 public $ontable; // string(128) not_null primary_key
14 public $onid; // int(11) not_null primary_key
15 public $person_id; // int(11) not_null primary_key
16 public $event; // string(128) not_null primary_key
17 public $medium; // string(128) not_null primary_key
18 public $active; // int(11) not_null
21 /* the code above is auto generated do not remove the tag below */
25 * The purpose of this is to gather all the events that have
26 * occured in the system (where watches exist)
27 * Do we want to send the user 1 email ?? or multiple...
28 * --> I guess multiple emails..
30 * so we need to return
34 $OBJECT:$ID, $OBJECT:$ID, $OBJECT:$ID, .....
38 * The mailer can then go through and call each object ??
41 * -- Things we can watch..
43 * mtrack_change <- this is a neat log of all events.
44 * which logs these things
45 * Individual Ticket changes (already)
46 * a Project -> which means ticket changes... which again can be discovered via mtrack_changes..
47 * a Repo for Commits (-- which will be handled by mtrack_changes)
48 * Wiki changes.. later...
54 function watched($medium, $watcher = null)
56 $w = DB_DataObject::factory('core_watch');
58 $w->person_id = $watcher;
65 if (!isset($ret[$o->person_id])) {
66 $ret[$o->person_id] = array();
68 $ret[$o->person_id][] = $o->ontable .':'. $o->onid;