[Tags performance] Fixed agents_get_modules to ajax calls

This commit is contained in:
Fermin 2018-10-05 13:32:14 +02:00
parent 1e4c570541
commit a72b9b0515
2 changed files with 5 additions and 1 deletions
pandora_console/include

View File

@ -554,7 +554,10 @@ if ($list_modules) {
$tags_sql = "";
if($cluster_list != 1) {
$tags = tags_get_user_applied_agent_tags ($id_agent, $access);
if (is_array($tags)) {
if ($tags === false) {
$tags_sql = " AND 1=0";
}
elseif (is_array($tags)) {
$tags_sql = " AND ttag_module.id_tag IN (" . implode(',', $tags) . ")";
$tags_join = "LEFT JOIN ttag_module
ON ttag_module.id_agente_modulo = tagente_modulo.id_agente_modulo";

View File

@ -2573,6 +2573,7 @@ function agents_get_all_groups_agent ($id_agent, $group = false, $force_meta = f
// If cannot retrieve the group, it means that agent does not exist
if (!$group) return array();
enterprise_include_once('include/functions_agents.php');
$secondary_groups = enterprise_hook('agents_get_secondary_groups', array($id_agent, $force_meta));
// Return only an array with the group in open version