if ($res === false) {
$this->jerr($x->_lastError->toString());
}
+ $ev = $this->addEvent("ADD", $x);
if (method_exists($x, 'onInsert')) {
- $x->onInsert($_REQUEST, $this);
+ $x->onInsert($_REQUEST, $this, $ev);
}
- $ev = $this->addEvent("ADD", $x);
+
if ($ev) {
$ev->audit($x);
}