mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
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 = '';
|
$error_msg = '';
|
||||||
if ($other['data'][2] != '') {
|
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];
|
$id_agent = $other['data'][2];
|
||||||
// To the next if is metaconsole and id_agent is not none.
|
// To the next if is metaconsole and id_agent is not none.
|
||||||
if (is_metaconsole() === true && $id_agent > 0) {
|
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;
|
$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()) {
|
if (is_metaconsole()) {
|
||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user