From d6ea5e9a6107c8d42f8e66efe024e2c971e17484 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 5 Mar 2014 16:09:48 +0800 Subject: [PATCH] DataObjects/Core_watch.php --- DataObjects/Core_watch.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/DataObjects/Core_watch.php b/DataObjects/Core_watch.php index f09a241e..54011c0e 100644 --- a/DataObjects/Core_watch.php +++ b/DataObjects/Core_watch.php @@ -48,12 +48,40 @@ class Pman_Core_DataObjects_Core_watch extends DB_DataObject ###END_AUTOCODE /** make sure there is a watch for this user.. */ + + function applyFilters($q,$au, $roo) + { + if (!empty($q['_list_actions'])) { + $this->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); -- 2.39.2