2009-08-20 Sancho Lerena <slerena@artica.es>

* godmode/agentes/configurar_agente.php: Fixed bug with agent address 
	edition (return 0 when no address was supplied).

	* godmode/modules/manage_network_components.php: Fixed typo.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1871 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2009-08-21 13:32:07 +00:00
parent 0d7da618f6
commit 40bf4ef53d
3 changed files with 19 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2009-08-20 Sancho Lerena <slerena@artica.es>
* godmode/agentes/configurar_agente.php: Fixed bug with agent address
edition (return 0 when no address was supplied).
* godmode/modules/manage_network_components.php: Fixed typo.
2009-08-19 Sancho Lerena <slerena@artica.es> 2009-08-19 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: A missing table was necessary to be added to allow recon * pandoradb.sql: A missing table was necessary to be added to allow recon
@ -36,6 +43,7 @@
* include/functions_config.php: add to save the attachment_store config * include/functions_config.php: add to save the attachment_store config
value. value.
2009-08-18 Miguel de Dios <miguel.dedios@artica.es> 2009-08-18 Miguel de Dios <miguel.dedios@artica.es>
* godmode/reporting/reporting_builder.php: add filter parameter in ajax that * godmode/reporting/reporting_builder.php: add filter parameter in ajax that

View File

@ -49,7 +49,7 @@ $campo_3 = "";
$maximo = 0; $maximo = 0;
$minimo = 0; $minimo = 0;
$nombre_agente = ""; $nombre_agente = "";
$direccion_agente = get_parameter ('direccion'); $direccion_agente = get_parameter ('direccion', '');
$intervalo = 300; $intervalo = 300;
$id_server = ""; $id_server = "";
$max_alerts = 0; $max_alerts = 0;
@ -107,18 +107,18 @@ $create_agent = (bool) get_parameter ('create_agent');
// Create agent // Create agent
if ($create_agent) { if ($create_agent) {
$nombre_agente = (string) get_parameter_post ("agente"); $nombre_agente = (string) get_parameter_post ("agente",'');
$direccion_agente = (string) get_parameter_post ("direccion"); $direccion_agente = (string) get_parameter_post ("direccion",'');
$grupo = (int) get_parameter_post ("grupo"); $grupo = (int) get_parameter_post ("grupo");
$intervalo = (string) get_parameter_post ("intervalo", 300); $intervalo = (string) get_parameter_post ("intervalo", 300);
$comentarios = (string) get_parameter_post ("comentarios"); $comentarios = (string) get_parameter_post ("comentarios", '');
$modo = (int) get_parameter_post ("modo"); $modo = (int) get_parameter_post ("modo");
$id_parent = (string) get_parameter_post ("id_parent"); $id_parent = (string) get_parameter_post ("id_parent",'');
$id_parent = (int) get_agent_id ($id_parent); $id_parent = (int) get_agent_id ($id_parent);
$server_name = (string) get_parameter_post ("server_name"); $server_name = (string) get_parameter_post ("server_name");
$id_os = (int) get_parameter_post ("id_os"); $id_os = (int) get_parameter_post ("id_os");
$disabled = (int) get_parameter_post ("disabled"); $disabled = (int) get_parameter_post ("disabled");
$custom_id = (string) get_parameter_post ("custom_id"); $custom_id = (string) get_parameter_post ("custom_id",'');
// Check if agent exists (BUG WC-50518-2) // Check if agent exists (BUG WC-50518-2)
if ($nombre_agente == "") { if ($nombre_agente == "") {
@ -259,14 +259,15 @@ if (isset( $_GET["fix_module"])) {
if (isset($_POST["update_agent"])) { // if modified some agent paramenter if (isset($_POST["update_agent"])) { // if modified some agent paramenter
$id_agente = (int) get_parameter_post ("id_agente"); $id_agente = (int) get_parameter_post ("id_agente");
$nombre_agente = (string) get_parameter_post ("agente", ""); $nombre_agente = (string) get_parameter_post ("agente", "");
$direccion_agente = (string) get_parameter_post ("direccion", ""); $direccion_agente = (string) get_parameter_post ("direccion", '');
$address_list = (string) get_parameter_post ("address_list", ""); $address_list = (string) get_parameter_post ("address_list", '');
if ($address_list != $direccion_agente && $direccion_agente == get_agent_address ($id_agente) && $address_list != get_agent_address ($id_agente)) { if ($address_list != $direccion_agente && $direccion_agente == get_agent_address ($id_agente) && $address_list != get_agent_address ($id_agente)) {
//If we selected another IP in the drop down list to be 'primary': //If we selected another IP in the drop down list to be 'primary':
// a) field is not the same as selectbox // a) field is not the same as selectbox
// b) field has not changed from current IP // b) field has not changed from current IP
// c) selectbox is not the current IP // c) selectbox is not the current IP
$direccion_agente = $address_list; if ($address_list != 0)
$direccion_agente = $address_list;
} }
$grupo = (int) get_parameter_post ("grupo", 0); $grupo = (int) get_parameter_post ("grupo", 0);
$intervalo = (int) get_parameter_post ("intervalo", 300); $intervalo = (int) get_parameter_post ("intervalo", 300);

View File

@ -213,7 +213,7 @@ $filter = array ();
if ($search_id_group) if ($search_id_group)
$filter['id_group'] = $search_id_group; $filter['id_group'] = $search_id_group;
if ($search_string != '') if ($search_string != '')
$filter[] = '(name LIKE "%'.$search_string.'%" OR description LIKE "%'.$search_string.'%" OR tcp_send LIKE "%'.$search_string.'%" OR tcp_rcv LIKE "%'.$search_stringg.'%")'; $filter[] = '(name LIKE "%'.$search_string.'%" OR description LIKE "%'.$search_string.'%" OR tcp_send LIKE "%'.$search_string.'%" OR tcp_rcv LIKE "%'.$search_string.'%")';
$total_components = get_network_components (false, $filter, 'COUNT(*) AS total'); $total_components = get_network_components (false, $filter, 'COUNT(*) AS total');
$total_components = $total_components[0]['total']; $total_components = $total_components[0]['total'];