if ($n == $o) {
continue;
}
-
-
- $ret += $this->auditChange($k, $new, $old);
+ $x = DB_DataObject::factory('core_event_audit');
+ $x->setFrom(array(
+ 'event_id' => $this->id,
+ 'name' => $k,
+ 'old_audit_id' => $old ? $x->findLast($this, $k) : 0,
+ 'newvalue' => $n
+
+ ));
+ $x->insert();
+ $ret++;
}
return $ret;
}
-
- function auditChange($field, $new, $old)
- {
-
- if (!$old === false) {
- $this->addentry($fieldname, 'set', $old, $new);
- return 1;
- }
- if ($new === false) {
- $this->addentry($fieldname, 'deleted', $old, $new);
- return 1;
- }
- $this->addentry($fieldname, 'changed', $old, $new);
- return 1;
- }
+
}