Fixed api create_event autovalidation on meta

This commit is contained in:
Luis Calvo 2020-10-22 11:35:07 +02:00
parent 7bd7d190c5
commit bfa8d703e7
1 changed files with 7 additions and 1 deletions

View File

@ -12513,7 +12513,13 @@ 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 IN (0,2) and id_extra ="'.$other['data'][18].'";'; if (is_metaconsole()) {
$table_event = 'tmetaconsole_event';
} else {
$table_event = 'tevento';
}
$sql_validation = 'SELECT id_evento FROM '.$table_event.' 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) {