X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_notify.php;h=e5c17ee7e2136ca136a60a5115479d016c9ff655;hb=0f051553a65f31981af05b560e0baf9cf6998781;hp=a68e693174c0b595b671e273d0b16e7e770ad5bc;hpb=b70ac3a22dd2b52530d604a5cbf48d7cb19f1bf3;p=Pman.Core diff --git a/DataObjects/Core_notify.php b/DataObjects/Core_notify.php index a68e6931..e5c17ee7 100644 --- a/DataObjects/Core_notify.php +++ b/DataObjects/Core_notify.php @@ -52,7 +52,11 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject { if ($set !== false) { $this->person_table = is_object($set) ? $set->tableName() : ''; - $this->person_id = is_object($set) ? $set->id : $set; + + $person_table = empty($this->person_table) ? 'Person' : $this->person_table; + $col = $person_table == "Person" ? 'person_id' : $person_table . '_id'; + + $this->{$col} = is_object($set) ? $set->id : $set; return; } static $cache =array();