Merge branch 'ent-6481-no-funciona-autovalidacion-eventos-meta' into 'develop'

Fixed api create_event autovalidation on meta

See merge request artica/pandorafms!3552
This commit is contained in:
Daniel Rodriguez 2020-10-28 13:09:01 +01:00
commit 4a89a91899
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] != '') {
$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);
if ($validation) {
foreach ($validation as $val) {