X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_watch.php;h=4a30b810c938cbf203e7d0f4823a44898a4021b1;hb=992cc0b774832f747c2cc3dfb2e601621cb30211;hp=437d32d23226629faf1ba72b8f49be13d370dc4e;hpb=372475903f9138b820dd011a1307219687656c4d;p=Pman.Core diff --git a/DataObjects/Core_watch.php b/DataObjects/Core_watch.php index 437d32d2..4a30b810 100644 --- a/DataObjects/Core_watch.php +++ b/DataObjects/Core_watch.php @@ -26,7 +26,7 @@ * * */ -require_once 'DB/DataObject.php'; +class_exists('DB_DataObject') ? '' : require_once 'DB/DataObject.php'; class Pman_Core_DataObjects_Core_watch extends DB_DataObject { @@ -218,7 +218,7 @@ class Pman_Core_DataObjects_Core_watch extends DB_DataObject function notifyEvent($event) { //print_r($event); - //DB_DataObject::DebugLevel(1); + //DB_DataObject::DebugLevel(1); // see if there are any watches on events.. // notify everyone flagged except the person doing it... // this is very basic logic... - @@ -235,12 +235,14 @@ class Pman_Core_DataObjects_Core_watch extends DB_DataObject $w->event = $event->action; $w->active = 1; - - $w->whereAdd('person_id != '. (int) $event->person_id); + // not sure why this is here... - it breaks on the reader article -> + if ($event->person_id) { + $w->whereAdd('person_id != '. (int) $event->person_id); + } $watches = $w->fetchAll(); - print_R($watches); + //print_R($watches); $nn = DB_DataObject::Factory('core_notify'); $nn->ontable = $event->on_table;