fixed error in massive operation

Former-commit-id: 691f3557d44c686645cfa634eab3630d060def33
This commit is contained in:
daniel 2018-12-28 12:14:17 +01:00
parent 7e2fb25e27
commit ac228a7fad
2 changed files with 3 additions and 3 deletions

View File

@ -285,7 +285,7 @@ else {
$filter = false;
}
$names = agents_get_modules (array_keys ($agents),
'DISTINCT(tagente_modulo.nombre)', $filter, false);
'tagente_modulo.nombre', $filter, false);
foreach ($names as $name) {
$modules[$name['nombre']] = $name['nombre'];
}

View File

@ -1231,8 +1231,8 @@ function agents_get_modules ($id_agent = null, $details = false,
ON tagente.id_agente = tasg.id_agent
WHERE tagente_modulo.delete_pending = 0
AND %s
GROUP BY tagente_modulo.id_agente_modulo
ORDER BY tagente_modulo.nombre',
GROUP BY 1
ORDER BY 1',
($details != 'tagente_modulo.*' && $indexed) ? 'tagente_modulo.id_agente_modulo,' : '',
io_safe_output(implode (",", (array) $details)),
$sql_tags_join,