diff --git a/Model/Behavior/AuditableBehavior.php b/Model/Behavior/AuditableBehavior.php index 8196188..e6610d9 100644 --- a/Model/Behavior/AuditableBehavior.php +++ b/Model/Behavior/AuditableBehavior.php @@ -186,7 +186,7 @@ public function afterSave(Model $Model, $created, $options = array()) { $data = array( 'Audit' => array( 'event' => $created ? 'CREATE' : 'EDIT', - 'model' => $Model->alias, + 'model' => $Model->plugin ? $Model->plugin . '.' . $Model->alias : $Model->alias, 'entity_id' => $Model->id, 'request_id' => self::_requestId(), 'json_object' => json_encode($audit), @@ -308,7 +308,7 @@ public function afterDelete(Model $Model) { $data = array( 'Audit' => array( 'event' => 'DELETE', - 'model' => $Model->alias, + 'model' => $Model->plugin ? $Model->plugin . '.' . $Model->alias : $Model->alias, 'entity_id' => $Model->id, 'request_id' => self::_requestId(), 'json_object' => json_encode($audit),