From 1d0694139a6f1817a227e082891f2918e2b7dec4 Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 29 Apr 2015 12:08:33 +0800 Subject: [PATCH] DataObjects/Core_notify.php --- DataObjects/Core_notify.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DataObjects/Core_notify.php b/DataObjects/Core_notify.php index 40063d01..287e3079 100644 --- a/DataObjects/Core_notify.php +++ b/DataObjects/Core_notify.php @@ -55,9 +55,11 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject return; } - $person_table = - $c = DB_DataObject::Factory('Person'); - $c->get($this->person_id); + $person_table = empty($this->person_table) ? 'Person' : $this->person_table; + $col = $person_table == "Person" ? 'person_id' : $person_table . '_id'; + + $c = DB_DataObject::Factory($person_table); + $c->get($col); return $c; } -- 2.39.2