Skip to content

Commit

Permalink
Merge pull request #117 from JoeSong/master
Browse files Browse the repository at this point in the history
Added plugin syntax for model names.
  • Loading branch information
Alex authored Aug 17, 2017
2 parents b8fa0f7 + 6918e17 commit 688f67d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Model/Behavior/AuditableBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 688f67d

Please sign in to comment.