X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=RooPostTrait.php;h=b71a458e486853ce441772e9fb861c1f32b7c734;hb=23c1f1c3f623285c4e255786b06ff78fdfd9bf1e;hp=8c1f5fe63edf32ca7c06004fd8aee74271b223eb;hpb=c7cf33b1b907ac8fc4aa9bff1dfce7e89ef1c67c;p=Pman.Core diff --git a/RooPostTrait.php b/RooPostTrait.php index 8c1f5fe6..b71a458e 100644 --- a/RooPostTrait.php +++ b/RooPostTrait.php @@ -66,7 +66,7 @@ trait Pman_Core_RooPostTrait { * * CALLS BEFORE change occurs: * - * beforeDelete($dependants_array, $roo) + * beforeDelete($dependants_array, $roo, $request) * Argument is an array of un-find/fetched dependant items. * - jerr() will stop insert.. (Prefered) * - return false for fail and set DO->err; @@ -282,9 +282,7 @@ trait Pman_Core_RooPostTrait { } - DB_DataObject::Factory('Events')->logDeletedRecord($x); - - $this->addEvent("DELETE", $x); + $this->logDeleteEvent($x); $xx->delete(); @@ -301,6 +299,17 @@ trait Pman_Core_RooPostTrait { } + function logDeleteEvent($object) + { + + DB_DataObject::Factory('Events')->logDeletedRecord($object); + + $this->addEvent("DELETE", $object); + + + } + + function update($x, $req, $with_perm_check = true) { if ( $with_perm_check && !$this->checkPerm($x,'E', $req) ) {