2011-05-11 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_agents.php: added hooks for to enterprise ACL.

	* extensions/module_groups.php: cleaned source code.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4334 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-05-11 09:08:47 +00:00
parent e0b8795251
commit 4978e1ea68
4 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2011-05-11 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_agents.php: added hooks for to enterprise ACL.
* extensions/module_groups.php: cleaned source code.
2011-05-10 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_graph.php

View File

@ -155,11 +155,12 @@ function mainModuleGroups() {
foreach ($modelGroups as $idModelGroup => $modelGroup) {
$query = sprintf($sql,$idAgentGroup, $idModelGroup);
$rowsDB = db_get_all_rows_sql ($query);
$agents = agents_get_group_agents($idAgentGroup);
if (!empty($agents)) {
$alerts = agents_get_alerts_simple($agents);

View File

@ -817,7 +817,16 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
else {
$search_sql .= ' AND disabled = 0';
}
//Add enterprise function to add other enterprise ACL.
if (ENTERPRISE_NOT_HOOK !== enterprise_include_once('include/functions_policies.php')) {
$operator = 'AND';
if (empty($search_sql))
$operator = '';
$search_sql .= subquery_acl_enterprise($operator);
}
switch ($config["dbtype"]) {
case "mysql":
case "postgresql":
@ -827,11 +836,11 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower
$sql = sprintf ("SELECT id_agente, nombre FROM tagente %s ORDER BY dbms_lob.substr(nombre,4000,1)", $search_sql);
break;
}
$result = db_get_all_rows_sql ($sql);
if ($result === false)
return array (); //Return an empty array
return array (); //Return an empty array
$agents = array ();
foreach ($result as $row) {

View File

@ -21,10 +21,13 @@ global $config;
require_once ("include/functions_agents.php");
require_once ($config["homedir"] . '/include/functions_graph.php');
include_graphs_dependencies();
require_once ($config['homedir'] . '/include/functions_groups.php');
check_login ();
$id_agente = get_parameter_get ("id_agente", -1);
$agent = db_get_row ("tagente", "id_agente", $id_agente);