Merge branch 'ent-7924-api-group-id-by-mname-falla-al-usar-url-encode-separator' into 'develop'

Fix api group_id_by_name with url enconde separator

See merge request artica/pandorafms!4391
This commit is contained in:
Daniel Rodriguez 2021-09-22 09:00:27 +00:00
commit 3338165dc3
1 changed files with 7 additions and 1 deletions

View File

@ -16733,9 +16733,15 @@ function api_get_group_id_by_name($thrash1, $thrash2, $other, $thrash3)
return;
}
if (is_array($other['data']) === true) {
$group_id = $other['data'][0];
} else {
$group_id = $other['data'];
}
$sql = sprintf(
'SELECT id_grupo
FROM tgrupo WHERE nombre = "'.$other['data'].'"'
FROM tgrupo WHERE nombre = "'.$group_id.'"'
);
$group_id = db_get_all_rows_sql($sql);