From 7df2e98721617b5494b519bf091d7dd64ffd4fe0 Mon Sep 17 00:00:00 2001 From: pabloconcepcion Date: Thu, 16 Jul 2009 15:28:07 +0000 Subject: [PATCH] Fixed a bug in include/functions_agents.php (create_agent) where the call to safe_int was incorrect git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1806 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 4 ++++ pandora_console/include/functions_agents.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index f0753babbf..f2a0b72994 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2009-07-16 Pablo de la ConcepcipĆ³n + + * include/functions_agents.php: fixed repeated empty test and safe_int call + 2009-07-16 Jorge Gonzalez * godmode/servers/manage_recontask_form.php: fixed wrong group diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index 89adcfd0b5..3046cf9aaf 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -28,11 +28,11 @@ function create_agent ($name, $id_group, $interval, $ip_address, $values = false) { if (empty ($name)) return false; - if (empty ($name)) + if (empty ($id_group)) return false; if (empty ($ip_address)) return false; - $interval = safe_int ($interval, 300); + $interval = safe_int ($interval,1, 300); if (empty ($interval)) return false; if (! is_array ($values))