From 5059b4f75f6a221e9c7480b4e53176d6c189638f Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 13 Oct 2016 09:41:03 +0800 Subject: [PATCH] DataObjects/Core_notify.php --- DataObjects/Core_notify.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DataObjects/Core_notify.php b/DataObjects/Core_notify.php index 1c92cd31..a445ded4 100644 --- a/DataObjects/Core_notify.php +++ b/DataObjects/Core_notify.php @@ -50,10 +50,12 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject function person($set = false) { + $def_pt = 'core_person'; + if ($set !== false) { $this->person_table = is_object($set) ? $set->tableName() : ''; - $def_pt = 'core_person'; + $person_table = empty($this->person_table) ? $def_pt : strtolower($this->person_table); $col = $person_table == $def_pt ? 'person_id' : $person_table . '_id'; @@ -62,7 +64,7 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject return; } static $cache =array(); - $person_table = empty($this->person_table) ? $def_pt : $this->person_table; + $person_table = empty($this->person_table) ? $def_pt : strtolower($this->person_table); $col = $person_table == $def_pt ? 'person_id' : $person_table . '_id'; if (isset($cache[$person_table .':'. $this->{$col}])) { -- 2.39.2