Controlled pandora_revent with id_agent 0
This commit is contained in:
parent
5342ae077c
commit
91d11bd4cf
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue