From: Alan Knowles Date: Fri, 17 Jun 2016 04:46:58 +0000 (+0800) Subject: RooPostTrait.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=d1d70ae95da7f336cc84ab1264003996dcfcbf86 RooPostTrait.php --- diff --git a/RooPostTrait.php b/RooPostTrait.php index aae1fa2f..f48c96dd 100644 --- a/RooPostTrait.php +++ b/RooPostTrait.php @@ -284,10 +284,6 @@ trait Pman_Core_RooPostTrait { $this->addDeleteEvent($x); - DB_DataObject::Factory('Events')->logDeletedRecord($x); - - $this->addEvent("DELETE", $x); - $xx->delete(); if (method_exists($xx,'onDelete')) { @@ -303,6 +299,17 @@ trait Pman_Core_RooPostTrait { } + function addDeleteEvent($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) ) {