Merge branch 'ent-9721-cli-add_event_comment-no-mete-id-de-evento-en-comentarios' into 'develop'

fixed CLI add comments pandora_enterprise#9721

See merge request artica/pandorafms!5248
This commit is contained in:
Rafael Ameijeiras 2022-12-12 22:49:06 +00:00
commit d874cbd5f1
1 changed files with 2 additions and 2 deletions

View File

@ -4671,7 +4671,7 @@ sub cli_add_event_comment() {
$id_user = 'admin';
}
else {
$id_user = pandora_get_user_id($dbh,$user_name);
$id_user = pandora_get_user_id($dbh,safe_input($user_name));
exist_check($id_user,'user',$user_name);
}
@ -4680,7 +4680,7 @@ sub cli_add_event_comment() {
my $current_comment = encode_utf8(pandora_get_event_comment($dbh, $id_event));
my $utimestamp = time ();
my @additional_comment = ({ comment => safe_input($comment), action => "Added comment", id_user => $id_user, utimestamp => $utimestamp});
my @additional_comment = ({ comment => safe_input($comment), action => "Added comment", id_user => $id_user, utimestamp => $utimestamp, event_id => $id_event});
print_log "[INFO] Adding event comment for event '$id_event'. \n\n";