DataObjects/Core_watch.php
[Pman.Core] / DataObjects / Core_watch.php
index e38efc9..583e38d 100644 (file)
@@ -102,14 +102,15 @@ class Pman_Core_DataObjects_Core_watch extends DB_DataObject
             $nn->person_id = $w->person_id;
             
             $nf = clone($nn);
-            $nf->whereAdd('sent < act_when');
+            $nf->whereAdd('sent < act_when - INTERVAL 1 HOUR');
             if ($nf->count()) {
                 // we have a item in the queue for that waiting to be sent..
                 continue;
             }
             $nn->act_start( date("Y-m-d H:i:s", $when !== false ? strtotime($when) : time()) );
             $nn->insert();
-        }     
+        }
+          
     }
     // static really...
     /**
@@ -157,13 +158,15 @@ class Pman_Core_DataObjects_Core_watch extends DB_DataObject
         
         $watches = $w->fetchAll();
         
+        //print_R($watches);exit;
+        
         $nn = DB_DataObject::Factory('core_notify');
         $nn->ontable    = $event->on_table;
         $nn->onid       = $event->on_id;
         
         foreach($watches as $watch) {
             if (!$watch->person_id) { // no people??? bugs in watch table
-                $dom = explode(':',$watch->event);
+                $dom = explode(':',$watch->medium);
                 if (count($dom) != 2) {
                     continue;
                 }