Controlled pandora_revent with id_agent 0

This commit is contained in:
José González 2021-05-18 16:37:05 +02:00
parent 5342ae077c
commit 91d11bd4cf
1 changed files with 2 additions and 2 deletions

View File

@ -12905,7 +12905,7 @@ function api_set_create_event($id, $trash1, $other, $returnType)
$error_msg = '';
if ($other['data'][2] != '') {
// Id agent assignment.
// Id agent assignment. If come from pandora_revent, id_agent can be 0.
$id_agent = $other['data'][2];
// To the next if is metaconsole and id_agent is not none.
if (is_metaconsole() === true && $id_agent > 0) {
@ -12931,7 +12931,7 @@ function api_set_create_event($id, $trash1, $other, $returnType)
$values['id_agente'] = $id_agent;
if (!util_api_check_agent_and_print_error($id_agent, 'string', 'AR')) {
if ((int) $id_agent > 0 && util_api_check_agent_and_print_error($id_agent, 'string', 'AR') === false) {
if (is_metaconsole()) {
metaconsole_restore_db();
}