Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
admin_audit_trail
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
admin_audit_trail
Commits
c03703c9
Commit
c03703c9
authored
1 year ago
by
Odai Atieh
Committed by
Rajab Natshah
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3314358
by Odai Atieh: Add support for node translation changes in Admin Audit Trail Node
parent
d92de0a0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
admin_audit_trail_node/admin_audit_trail_node.module
+34
-0
34 additions, 0 deletions
admin_audit_trail_node/admin_audit_trail_node.module
with
34 additions
and
0 deletions
admin_audit_trail_node/admin_audit_trail_node.module
+
34
−
0
View file @
c03703c9
...
...
@@ -67,3 +67,37 @@ function admin_audit_trail_node_delete($node) {
];
admin_audit_trail_insert
(
$log
);
}
/**
* Implements hook_entity_translation_insert().
*/
function
admin_audit_trail_node_translation_insert
(
$node
)
{
$log
=
[
'type'
=>
'node'
,
'operation'
=>
'translation insert'
,
'description'
=>
t
(
'%type: %title'
,
[
'%type'
=>
$node
->
getType
(),
'%title'
=>
$node
->
getTitle
(),
]),
'ref_numeric'
=>
$node
->
id
(),
'ref_char'
=>
$node
->
getTitle
(),
];
admin_audit_trail_insert
(
$log
);
}
/**
* Implements hook_entity_translation_delete().
*/
function
admin_audit_trail_node_translation_delete
(
$node
)
{
$log
=
[
'type'
=>
'node'
,
'operation'
=>
'translation delete'
,
'description'
=>
t
(
'%type: %title'
,
[
'%type'
=>
$node
->
getType
(),
'%title'
=>
$node
->
getTitle
(),
]),
'ref_numeric'
=>
$node
->
id
(),
'ref_char'
=>
$node
->
getTitle
(),
];
admin_audit_trail_insert
(
$log
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment