Fix bugs found during testing. #330
This commit is contained in:
parent
eff3dc94ec
commit
e305dc4c16
1 changed files with 3 additions and 4 deletions
|
|
@ -33,13 +33,10 @@ abstract class EntityListener
|
|||
|
||||
// get entity name
|
||||
$obj_class = preg_replace('/.*\\\\/', '', get_class($object));
|
||||
$log_message = $obj_class . ' with id ' . $object->getID() . ' created by ' . $user_id;
|
||||
|
||||
// get fields of object
|
||||
$fields = $object->fieldDump();
|
||||
|
||||
error_log($log_message . ' with ' . $fields);
|
||||
|
||||
$this->writeToLogDB($obj_class, $object->getID(), 'create', $fields, $user_id);
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +85,9 @@ abstract class EntityListener
|
|||
];
|
||||
}
|
||||
|
||||
$this->writeToLogDB($obj_class, $updated_entity->getID(), 'update', $field_changes, $user_id);
|
||||
$fields = json_encode($field_changes);
|
||||
|
||||
$this->writeToLogDB($obj_class, $updated_entity->getID(), 'update', $fields, $user_id);
|
||||
}
|
||||
|
||||
// get deleted objects
|
||||
|
|
|
|||
Loading…
Reference in a new issue