From f22cc5b22bbbdf846a093a1a14bcd79e228d303d Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Tue, 9 Jun 2020 11:54:02 +0200 Subject: [PATCH] add owner when validate event --- pandora_console/include/functions_events.php | 22 +++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/functions_events.php b/pandora_console/include/functions_events.php index 3e71596c36..a5b442d69c 100644 --- a/pandora_console/include/functions_events.php +++ b/pandora_console/include/functions_events.php @@ -612,14 +612,12 @@ function events_update_status($id_evento, $status, $filter=null, $history=false) 'UPDATE %s SET estado = %d, ack_utimestamp = %d, - id_usuario = "%s", - owner_user = "%s" + id_usuario = "%s" WHERE id_evento IN (%s)', $table, $status, time(), $config['id_user'], - $config['id_user'], join(',', $target_ids) ); } @@ -635,6 +633,14 @@ function events_update_status($id_evento, $status, $filter=null, $history=false) break; case EVENT_STATUS_VALIDATED: + events_change_owner( + $id_evento, + $config['id_user'], + false, + is_metaconsole() ? true : false, + $history + ); + $status_string = 'Validated'; break; @@ -1872,6 +1878,16 @@ function events_change_status( return false; } + if ($new_status == EVENT_STATUS_VALIDATED) { + events_change_owner( + $id_event, + $config['id_user'], + false, + $meta, + $history + ); + } + events_comment( $id_event, '',