2010-10-25 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_agents.php: clean source style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3460 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
236e3f589b
commit
c56fbc43c8
|
@ -1,3 +1,7 @@
|
|||
2010-10-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_agents.php: clean source style.
|
||||
|
||||
2010-10-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_agents.php, godmode/agentes/modificar_agente.php,
|
||||
|
|
|
@ -109,11 +109,14 @@ function create_agent ($name, $id_group, $interval, $ip_address, $values = false
|
|||
* @return array All simple alerts defined for an agent. Empty array if no
|
||||
* alerts found.
|
||||
*/
|
||||
function get_agent_alerts_simple ($id_agent = false, $filter = '', $options = false, $where = '', $allModules = false, $orderby = false, $idGroup = false, $count = false) {
|
||||
function get_agent_alerts_simple ($id_agent = false, $filter = '', $options = false, $where = '',
|
||||
$allModules = false, $orderby = false, $idGroup = false, $count = false) {
|
||||
|
||||
if (is_array($filter)) {
|
||||
$disabled = $filter['disabled'];
|
||||
$filter = ' AND talert_template_modules.standby = "'.$filter['standby'].'"';
|
||||
}else {
|
||||
}
|
||||
else {
|
||||
$filter = '';
|
||||
$disabled = $filter;
|
||||
}
|
||||
|
@ -227,6 +230,7 @@ function get_agent_alerts_compound ($id_agent = false, $filter = '', $options =
|
|||
break;
|
||||
default:
|
||||
$filter = '';
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_array ($options)) {
|
||||
|
@ -299,13 +303,15 @@ function get_agents ($filter = false, $fields = false, $access = 'AR', $order =
|
|||
//If no group specified, get all user groups
|
||||
if (empty ($filter['id_grupo'])) {
|
||||
$filter['id_grupo'] = $groups;
|
||||
} elseif (! is_array ($filter['id_grupo'])) {
|
||||
}
|
||||
elseif (! is_array ($filter['id_grupo'])) {
|
||||
//If group is specified but not allowed, return false
|
||||
if (! in_array ($filter['id_grupo'], $groups)) {
|
||||
return false;
|
||||
}
|
||||
$filter['id_grupo'] = (array) $filter['id_grupo']; //Make an array
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
//Check each group specified to the user groups, remove unwanted groups
|
||||
foreach ($filter['id_grupo'] as $key => $id_group) {
|
||||
if (! in_array ($id_group, $groups)) {
|
||||
|
|
Loading…
Reference in New Issue