From 30209f25f39b9e8b800eaaa551ef9b236600f5a1 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 14 Oct 2015 14:41:48 +0800 Subject: [PATCH] DataObjects/Core_notify.php --- DataObjects/Core_notify.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/DataObjects/Core_notify.php b/DataObjects/Core_notify.php index 8199de9d..4c02e6f1 100644 --- a/DataObjects/Core_notify.php +++ b/DataObjects/Core_notify.php @@ -96,13 +96,14 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject $x = DB_DataObject::Factory($this->tableName()); $x->object($obj); $x->person($person); - $x->onid = $obj->id; - $x->ontable = $obj->tableName; - $x->person_table = $person->person_table; - $x-> - $person_table = empty($this->person_table) ? 'Person' : $this->person_table; - $col = $person_table == "Person" ? 'person_id' : $person_table . '_id'; - + if (!empty($evtype)) { + $x->evtype = $evtype; + } + if ($x->count() != 1) { + return false; + } + $x->find(true); + return $x; } -- 2.39.2