mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch 'ent-4073-eventos-en-proceso-no-validan-ni-id-evento-ni-id-extra' into 'develop'
Eventos en proceso no se validan ni por id_evento no por id_extra See merge request artica/pandorafms!2481
This commit is contained in:
commit
975d48a653
@ -11519,7 +11519,7 @@ function api_set_create_event($id, $trash1, $other, $returnType)
|
|||||||
|
|
||||||
if ($other['data'][18] != '') {
|
if ($other['data'][18] != '') {
|
||||||
$values['id_extra'] = $other['data'][18];
|
$values['id_extra'] = $other['data'][18];
|
||||||
$sql_validation = 'SELECT id_evento FROM tevento where estado=0 and id_extra ="'.$other['data'][18].'";';
|
$sql_validation = 'SELECT id_evento FROM tevento where estado IN (0,2) and id_extra ="'.$other['data'][18].'";';
|
||||||
$validation = db_get_all_rows_sql($sql_validation);
|
$validation = db_get_all_rows_sql($sql_validation);
|
||||||
if ($validation) {
|
if ($validation) {
|
||||||
foreach ($validation as $val) {
|
foreach ($validation as $val) {
|
||||||
|
@ -3352,7 +3352,7 @@ sub pandora_event ($$$$$$$$$$;$$$$$$$$$$$) {
|
|||||||
# Validate events with the same event id
|
# Validate events with the same event id
|
||||||
if (defined ($id_extra) && $id_extra ne '') {
|
if (defined ($id_extra) && $id_extra ne '') {
|
||||||
logger($pa_config, "Updating events with extended id '$id_extra'.", 10);
|
logger($pa_config, "Updating events with extended id '$id_extra'.", 10);
|
||||||
db_do ($dbh, 'UPDATE ' . $event_table . ' SET estado = 1, ack_utimestamp = ? WHERE estado = 0 AND id_extra=?', $utimestamp, $id_extra);
|
db_do ($dbh, 'UPDATE ' . $event_table . ' SET estado = 1, ack_utimestamp = ? WHERE estado IN (0,2) AND id_extra=?', $utimestamp, $id_extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create the event
|
# Create the event
|
||||||
|
Loading…
x
Reference in New Issue
Block a user