X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_watch.php;h=bc106e3ec3f0ff15e861ba759457c46c6d135112;hb=23d39850c0b2d28bcebb9cffda0b4307d9847de2;hp=d96e4de7cbbf83cbb33143d7acd67c301d2ad9be;hpb=96db402a80421a075e11e0c0e789193fcae3178b;p=Pman.Core diff --git a/DataObjects/Core_watch.php b/DataObjects/Core_watch.php index d96e4de7..bc106e3e 100644 --- a/DataObjects/Core_watch.php +++ b/DataObjects/Core_watch.php @@ -1,3 +1,4 @@ + listActions($roo,$q); + } + + + } + function listActions($roo, $q) { + + $d = DB_DataObject::Factory($q['on_table']); + $ret = array(); + foreach(get_class_methods($d) as $m) { + if (!preg_match('/^notify/', $m)) { + continue; + } + $ret[] = array( + 'display_name' => preg_replace('/^notify/', '' , $m), + 'name' => $q['on_table'] .':'. $m + ); + } + $roo->jdata($ret); + } + /** * * Create a watch... * */ + + + function ensureNotify( $ontable, $onid, $person_id, $whereAdd) { //DB_DAtaObject::debugLevel(1); @@ -222,10 +251,8 @@ class Pman_Core_DataObjects_Core_watch extends DB_DataObject continue; } //echo "inserting notify?"; - $n->act_start( date("Y-m-d H:i:s") ); + $n->act_start( empty($n->act_start) ? date("Y-m-d H:i:s") : $n->act_start ); $n->insert(); - - }