From b8c6b094966776feb25d5ab06acf0bebec8275ac Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Thu, 29 Jan 2015 20:26:46 +0100 Subject: [PATCH] Fixed an error that made impossible the connection with the metaconsole nodes --- pandora_console/include/ajax/module.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/ajax/module.php b/pandora_console/include/ajax/module.php index 6e5e937da3..d6218d9843 100755 --- a/pandora_console/include/ajax/module.php +++ b/pandora_console/include/ajax/module.php @@ -79,14 +79,15 @@ if ($get_module_detail) { if (defined ('METACONSOLE')) { $server = metaconsole_get_connection ($server_name); - $conexion = mysql_connect ($server['dbhost'], $server['dbuser'], - $server['dbpass']); - $select_db = mysql_select_db ($server['dbname'], $conexion); + + if (metaconsole_connect($server) != NOERR) + return; + $conexion = false; } else { $conexion = false; } - + html_debug_print($conexion, true); $selection_mode = get_parameter('selection_mode', 'fromnow'); $date_from = (string) get_parameter ('date_from', date ('Y-m-j')); $time_from = (string) get_parameter ('time_from', date ('h:iA')); @@ -266,6 +267,7 @@ if ($get_module_detail) { html_print_table($table); } + metaconsole_restore_db(); return; }