X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2FCore_notify.php;h=a445ded42b7a9d79c37aedfe4ab8303b515a894f;hb=5059b4f75f6a221e9c7480b4e53176d6c189638f;hp=6a1b4b58da9ff49e4075ad53ef613303cc953d91;hpb=92580f4dbc6eeab50aea3e60261c91428d1b3826;p=Pman.Core diff --git a/DataObjects/Core_notify.php b/DataObjects/Core_notify.php index 6a1b4b58..a445ded4 100644 --- a/DataObjects/Core_notify.php +++ b/DataObjects/Core_notify.php @@ -50,19 +50,21 @@ 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 : $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'; $this->{$col} = is_object($set) ? $set->id : $set; 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}])) {