X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_watch.php;h=4a30b810c938cbf203e7d0f4823a44898a4021b1;hb=b36bf5d2f8d0ce1c9d58e0085c233a48bd0bc390;hp=fcefdad53a7af98dd79d2c89177f946074f58e5c;hpb=41258003a54804001df682c1a6973b2a5d31543f;p=Pman.Core diff --git a/DataObjects/Core_watch.php b/DataObjects/Core_watch.php index fcefdad5..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); //exit; + //print_R($watches); $nn = DB_DataObject::Factory('core_notify'); $nn->ontable = $event->on_table;