Re-added lost function 'tags_get_module_policy_tags'. TICKET: #1881

This commit is contained in:
mdtrooper 2015-03-04 11:39:25 +01:00
parent 066f91e30f
commit 7e7e40dd02
1 changed files with 31 additions and 27 deletions

View File

@ -1916,7 +1916,8 @@ function tags_get_all_user_agents ($id_tag = false, $id_user = false, $groups_an
$order_by_condition = '';
if (!empty($filter['order'])) {
$order_by_condition = " ORDER BY ".$filter['order'];
} else {
}
else {
$order_by_condition = " ORDER BY tagente.nombre ASC";
}
$limit_sql = '';
@ -1933,7 +1934,8 @@ function tags_get_all_user_agents ($id_tag = false, $id_user = false, $groups_an
if (!empty($filter['group_by'])) {
$group_by = " GROUP BY ".$filter['group_by'];
} else {
}
else {
$group_by = " GROUP BY tagente.nombre";
}
@ -1957,16 +1959,6 @@ function tags_get_all_user_agents ($id_tag = false, $id_user = false, $groups_an
}
}
//~ $user_agents_sql = "SELECT ".$select_fields ."
//~ FROM tagente, tagente_modulo, ttag_module
//~ WHERE tagente.id_agente = tagente_modulo.id_agente
//~ AND tagente_modulo.id_agente_modulo = ttag_module.id_agente_modulo
//~ ". $tag_filter .
//~ $groups_clause . $search_sql . $void_agents .
//~ $status_sql .
//~ $group_by .
//~ " ORDER BY tagente.nombre ASC";
$user_agents_sql = "SELECT ".$select_fields ."
FROM tagente, tagente_modulo, ttag_module
WHERE tagente.id_agente = tagente_modulo.id_agente
@ -2042,7 +2034,8 @@ function tags_get_agent_modules ($id_agent, $groups_and_tags = array(), $fields
$tag_filter .
$filter_sql ."
ORDER BY nombre";
} else {
}
else {
$agent_modules_sql = "SELECT ".$select_fields ."
FROM tagente_modulo
@ -2078,4 +2071,15 @@ function tags_get_agent_modules ($id_agent, $groups_and_tags = array(), $fields
return $result;
}
function tags_get_module_policy_tags($id_tag, $id_module) {
if (empty($id_tag))
return false;
$id_module_policy = db_get_value_filter('id_policy_module',
'ttag_module',
array('id_tag' => $id_tag, 'id_agente_modulo' => $id_module));
return $id_module_policy;
}
?>