Merge branch 'ent-12768-16921-operator-read-puede-ver-inventario-de-todos-los-grupos' into 'develop'
Ent 12768 16921 operator read puede ver inventario de todos los grupos See merge request artica/pandorafms!6853
This commit is contained in:
commit
81d937ae30
|
@ -892,6 +892,15 @@ function get_data_basic_info_sql($params, $count=false)
|
|||
|
||||
if ($params['id_group'] > 0) {
|
||||
$where .= sprintf(' AND id_grupo = %d', $params['id_group']);
|
||||
} else {
|
||||
global $config;
|
||||
$user_groups = implode(',', array_keys(users_get_groups($config['id_user'])));
|
||||
// Avoid errors if there are no groups.
|
||||
if (empty($user_groups) === true) {
|
||||
$user_groups = '"0"';
|
||||
}
|
||||
|
||||
$where .= sprintf(' AND id_grupo IN (%s)', $user_groups);
|
||||
}
|
||||
|
||||
if ($params['search'] > 0) {
|
||||
|
|
Loading…
Reference in New Issue