mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
[Tags performance] Fixed agents_get_modules to ajax calls
This commit is contained in:
parent
1e4c570541
commit
a72b9b0515
@ -554,7 +554,10 @@ if ($list_modules) {
|
|||||||
$tags_sql = "";
|
$tags_sql = "";
|
||||||
if($cluster_list != 1) {
|
if($cluster_list != 1) {
|
||||||
$tags = tags_get_user_applied_agent_tags ($id_agent, $access);
|
$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_sql = " AND ttag_module.id_tag IN (" . implode(',', $tags) . ")";
|
||||||
$tags_join = "LEFT JOIN ttag_module
|
$tags_join = "LEFT JOIN ttag_module
|
||||||
ON ttag_module.id_agente_modulo = tagente_modulo.id_agente_modulo";
|
ON ttag_module.id_agente_modulo = tagente_modulo.id_agente_modulo";
|
||||||
|
@ -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 cannot retrieve the group, it means that agent does not exist
|
||||||
if (!$group) return array();
|
if (!$group) return array();
|
||||||
|
|
||||||
|
enterprise_include_once('include/functions_agents.php');
|
||||||
$secondary_groups = enterprise_hook('agents_get_secondary_groups', array($id_agent, $force_meta));
|
$secondary_groups = enterprise_hook('agents_get_secondary_groups', array($id_agent, $force_meta));
|
||||||
|
|
||||||
// Return only an array with the group in open version
|
// Return only an array with the group in open version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user