Skip to content

Commit

Permalink
See ezsystems#426 - Add state change/assign to the audit log (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagocamposviana authored and pkamps committed Mar 7, 2017
1 parent 28d9ecd commit 11d3010
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kernel/content/ezcontentoperationcollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,10 @@ static public function updateObjectState( $objectID, $selectedStateIDList )
$state = eZContentObjectState::fetchById( $selectedStateID );
$object->assignState( $state );
}
eZAudit::writeAudit( 'state-assign', array( 'Content object ID' => $object->attribute( 'id' ),
'Content object name' => $object->attribute( 'name' ),
'Selected State ID Array' => implode( ', ' , $selectedStateIDList ),
'Comment' => 'Updated states of the current object: eZContentOperationCollection::updateObjectState()' ) );
//call appropriate method from search engine
eZSearch::updateObjectState($objectID, $selectedStateIDList);

Expand Down
3 changes: 3 additions & 0 deletions settings/audit.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ AuditFileNames[role-assign]=role_assign.log
# Who assigns which section at which node (user / section id / section name)
AuditFileNames[section-assign]=section_assign.log

# Who updated the object states
AuditFileNames[state-assign]=state_assign.log

# Who deleted which order in shop (user / order id)
AuditFileNames[order-delete]=order_delete.log

0 comments on commit 11d3010

Please sign in to comment.