projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
46bcfef
)
DataObjects/Core_notify.php
author
Alan Knowles
<alan@roojs.com>
Wed, 14 Oct 2015 06:40:46 +0000
(14:40 +0800)
committer
Alan Knowles
<alan@roojs.com>
Wed, 14 Oct 2015 06:40:46 +0000
(14:40 +0800)
DataObjects/Core_notify.php
patch
|
blob
|
history
diff --git
a/DataObjects/Core_notify.php
b/DataObjects/Core_notify.php
index
e73e61c
..
8199de9
100644
(file)
--- a/
DataObjects/Core_notify.php
+++ b/
DataObjects/Core_notify.php
@@
-51,6
+51,7
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
function person($set = false)
{
if ($set !== false) {
function person($set = false)
{
if ($set !== false) {
+ $this->person_table = is_object($set) ? $set->tableName() : '';
$this->person_id = is_object($set) ? $set->id : $set;
return;
}
$this->person_id = is_object($set) ? $set->id : $set;
return;
}
@@
-89,6
+90,23
@@
class Pman_Core_DataObjects_Core_notify extends DB_DataObject
return false;
}
return false;
}
+
+ function lookup($obj, $person, $evtype='')
+ {
+ $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';
+
+
+ }
+
+
function beforeDelete($dependants_array, $roo) {
if ($this->delivered()) {
$roo->jerr("you can not delete a record of a successfull delivery");
function beforeDelete($dependants_array, $roo) {
if ($this->delivered()) {
$roo->jerr("you can not delete a record of a successfull delivery");