DataObjects/Core_watch.php
[Pman.Core] / DataObjects / Core_watch.php
index 7e4bebc..f17c60b 100644 (file)
@@ -85,6 +85,11 @@ class Pman_Core_DataObjects_Core_watch extends DB_DataObject
         if ($whereAdd !== false) { 
             $w->whereAdd($whereAdd  );
         }
+        $w->active =1;
+        
+         $w->whereAdd('onid = 0 OR onid='. ((int) $onid));
+       
+        
         $w->ontable = $ontable;
         //$w->selectAdd();
         //$w->selectAdd('distinct(person_id) as person_id');
@@ -125,12 +130,12 @@ class Pman_Core_DataObjects_Core_watch extends DB_DataObject
      *  = eg. mtrack_ticket * watch will notify mtrack_jira::
      *
      *  in that example:
-     *     ublic $ontable;                         // string(128)  not_null
-    public $onid;                            // int(11)  not_null
-    public $person_id;                       // int(11)  not_null
-    public $event;                           // string(128)  not_null
-    public $medium;                          // string(128)  not_null
-    public $active;                          // int(11)  not_null
+     *     public $ontable;                         // string(128)  not_null
+            public $onid;                            // int(11)  not_null
+            public $person_id;                       // int(11)  not_null
+            public $event;                           // string(128)  not_null
+            public $medium;                          // string(128)  not_null
+            public $active;                          // int(11)  not_null
 
      */