wip reports alert actions

This commit is contained in:
Daniel Barbero Martin 2021-11-26 13:52:15 +01:00
parent be5fe18762
commit cb0039d7a7
2 changed files with 11 additions and 5 deletions

View File

@ -1772,18 +1772,24 @@ $class = 'databox filters';
$all_modules = ''; $all_modules = '';
} else { } else {
$all_modules = db_get_all_rows_sql( $all_modules = db_get_all_rows_sql(
'SELECT DISTINCT nombre, id_agente_modulo FROM sprintf(
tagente_modulo WHERE id_agente IN ('.implode(',', array_values($id_agents)).')' 'SELECT nombre, id_agente_modulo
FROM tagente_modulo
WHERE id_agente IN (%s)',
implode(',', array_values($id_agents))
)
); );
} }
if ((empty($all_modules)) || $all_modules == -1) { if (empty($all_modules) === 1 || $all_modules == -1) {
$all_modules = []; $all_modules = [];
} }
$modules_select = []; $modules_select = [];
$all_modules_structured = []; $all_modules_structured = [];
if (is_array($idAgentModule) || is_object($idAgentModule)) { if (is_array($idAgentModule) === true
|| is_object($idAgentModule) === true
) {
foreach ($all_modules as $key => $a) { foreach ($all_modules as $key => $a) {
foreach ($idAgentModule as $id) { foreach ($idAgentModule as $id) {
if ((int) $a['id_agente_modulo'] === (int) $id) { if ((int) $a['id_agente_modulo'] === (int) $id) {

View File

@ -310,7 +310,7 @@ if (is_ajax()) {
echo json_encode($modules); echo json_encode($modules);
} else { } else {
select_modules_for_agent_group($id_group, $id_agents, $selection); select_modules_for_agent_group($id_group, $id_agents, $selection, false);
} }
} }