Merge branch 'ent-3855-Problemas_grupos_secundarios_en_input_auto_completado_de_modulos' into 'develop'
fixed error autocomplete input module See merge request artica/pandorafms!2345 Former-commit-id: 76a7c4aa1d611a21b307d0d6367a1f15dc40b323
This commit is contained in:
commit
5494a6129f
|
@ -2744,28 +2744,7 @@ function html_print_autocomplete_modules(
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if ($id_agents === false) {
|
if ($id_agents === false) {
|
||||||
$groups = [];
|
$agents = agents_get_agents();
|
||||||
if ($ACL) {
|
|
||||||
$groups = users_get_groups($config['id_user'], 'AW', false);
|
|
||||||
$groups = array_keys($groups);
|
|
||||||
|
|
||||||
if (empty($groups)) {
|
|
||||||
$id_groups = 0;
|
|
||||||
} else {
|
|
||||||
$id_groups = implode(',', $groups);
|
|
||||||
}
|
|
||||||
|
|
||||||
$agents = db_get_all_rows_sql(
|
|
||||||
'SELECT id_agente
|
|
||||||
FROM tagente
|
|
||||||
WHERE id_grupo IN ('.$id_groups.')'
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$agents = db_get_all_rows_sql(
|
|
||||||
'SELECT id_agente
|
|
||||||
FROM tagente'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($agents === false) {
|
if ($agents === false) {
|
||||||
$agents = [];
|
$agents = [];
|
||||||
|
@ -2777,10 +2756,7 @@ function html_print_autocomplete_modules(
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($ACL) {
|
if ($ACL) {
|
||||||
$groups = users_get_groups($config['id_user'], 'AW', false);
|
$agents = agents_get_agents();
|
||||||
$groups = array_keys($groups);
|
|
||||||
|
|
||||||
$agents = db_get_all_rows_sql('SELECT id_agente FROM tagente WHERE id_grupo IN ('.implode(',', $groups).')');
|
|
||||||
|
|
||||||
if ($agents === false) {
|
if ($agents === false) {
|
||||||
$agents = [];
|
$agents = [];
|
||||||
|
|
Loading…
Reference in New Issue