From 65b5ce49b4211223f5b2ccc596e8f26909c2c990 Mon Sep 17 00:00:00 2001 From: Dario Clavijo Date: Fri, 3 Nov 2017 19:04:28 -0300 Subject: [PATCH 1/2] BUG: host_register and host_active should not be an array --- www/modules/Discovery/include/results.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/modules/Discovery/include/results.php b/www/modules/Discovery/include/results.php index d88b3ee..17f0bd7 100644 --- a/www/modules/Discovery/include/results.php +++ b/www/modules/Discovery/include/results.php @@ -148,8 +148,8 @@ function getListHost() { // Ajout macros } $tmpConf["host"]["host_snmp_version"] = $hostInfos["snmp_version"]; - $tmpConf["host"]["host_register"]["host_register"] = "1"; - $tmpConf["host"]["host_activate"]["host_activate"] = "1"; + $tmpConf["host"]["host_register"] = "1"; + $tmpConf["host"]["host_activate"] = "1"; $tmpConf["host"]["host_template_model_htm_id"] = $_POST["select_template".$host]; if ($_POST["select_group".$host]!= -1) { @@ -478,4 +478,4 @@ function setScanValues(){ \ No newline at end of file + From c7be71f86e147cf709921310c1d857b5aa170162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Clavijo?= Date: Mon, 15 Jan 2018 17:45:52 -0300 Subject: [PATCH 2/2] fixed SQL INSERT --- www/modules/Discovery/sql/install.sql | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/www/modules/Discovery/sql/install.sql b/www/modules/Discovery/sql/install.sql index 34289ee..3f2445b 100644 --- a/www/modules/Discovery/sql/install.sql +++ b/www/modules/Discovery/sql/install.sql @@ -30,11 +30,11 @@ -- -- Insertion des pages du module Centreon Discovery INSERT INTO `topology` (`topology_id`, `topology_name`, `topology_icone`, `topology_parent`, `topology_page`, `topology_order`, `topology_group`, `topology_url`, `topology_url_opt`, `topology_popup`, `topology_modules`, `topology_show`) -VALUES ('', 'Centreon Discovery', NULL, 6, 612, 100, 1, './modules/Discovery/include/ips.php', NULL, '0', '1', '1') , -('', 'IP addresses', './img/icones/16x16/client_network.gif', 612, 61201, 1, 1, './modules/Discovery/include/ips.php', NULL, '0', '1', '1') , -('', 'Results', './img/icones/16x16/column.gif', 612, 61202, 101, 1, './modules/Discovery/include/results.php', NULL, '0', '1', '1') , -('', 'Configuration', './img/icones/16x16/gear.gif', 612, 61203, 102, 1, './modules/Discovery/include/configuration.php', NULL, '0', '1', '1') , -('', 'About', './img/icones/16x16/about.gif', 612, 61204, 103, 1, './modules/Discovery/include/informations.php', NULL, '0', '1', '1'); +VALUES (NULL, 'Centreon Discovery', NULL, 6, 612, 100, 1, './modules/Discovery/include/ips.php', NULL, '0', '1', '1') , +(NULL, 'IP addresses', 612, 61201, 1, 1, './modules/Discovery/include/ips.php', NULL, '0', '1', '1') , +(NULL, 'Results', 612, 61202, 101, 1, './modules/Discovery/include/results.php', NULL, '0', '1', '1') , +(NUL, 'Configuration', 612, 61203, 102, 1, './modules/Discovery/include/configuration.php', NULL, '0', '1', '1') , +(NULL, 'About', 612, 61204, 103, 1, './modules/Discovery/include/informations.php', NULL, '0', '1', '1'); -- DATABASE : @DB_NAME_CENTREON@ @@ -128,4 +128,4 @@ CREATE TABLE IF NOT EXISTS `mod_discovery_config` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `@DB_NAME_CENTREON@`.`mod_discovery_config` (`host_exists_color`, `ip_exists_color`, `host_missing_color`, `consider_fqdn`) VALUES -('#008000', '#ffa500', '#ff0000', '1'); \ No newline at end of file +('#008000', '#ffa500', '#ff0000', '1');