From 907a8ea007d77d344448dbad68ec2c9a24b9bc18 Mon Sep 17 00:00:00 2001 From: slerena Date: Wed, 21 Jan 2009 01:49:11 +0000 Subject: [PATCH] 2009-01-21 Sancho Lerena * pandoradb_migrate_20_to_21.sql: Fixes some problems. * setup.php: Removed AD setup tokens. * user_list.php: Link to user edition was wrong. Restored. * functions_db.php: Support for new auth modules was missing and fgraph fails to render graphs. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1374 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 11 +++++++++++ pandora_console/godmode/setup/setup.php | 10 ---------- pandora_console/godmode/users/user_list.php | 2 +- pandora_console/include/functions_db.php | 6 ++++++ pandora_console/pandoradb_migrate_20_to_21.sql | 10 ++++------ 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 779d3cabc5..c89710a2c9 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,14 @@ +2009-01-21 Sancho Lerena + + * pandoradb_migrate_20_to_21.sql: Fixes some problems. + + * setup.php: Removed AD setup tokens. + + * user_list.php: Link to user edition was wrong. Restored. + + * functions_db.php: Support for new auth modules was missing + and fgraph fails to render graphs. + 2009-01-20 Esteban Sanchez * godmode/alerts/configure_alert_template.php: Fixed an error when diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index d6abc9e4c5..4c26639cd4 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -148,16 +148,6 @@ $table->data[17][1] = print_checkbox ('autoupdate', 1, $config["autoupdate"], tr // 18 enterprise_hook ('load_snmpforward_enterprise'); -$table->data[19][0] = __('Activate AD Authentication'); -$table->data[19][1] = print_checkbox ('ad_auth', 1, $config["ad_auth"], false); - -$table->data[20][0] = __('Activate AD Authentication'); -$table->data[20][1] = print_input_text ('loginhash_pwd', $config["loginhash_pwd"], '', 15, 15, true); - -$table->data[21][0] = __('Activate AD Authentication'); -$table->data[21][1] = print_input_text ('loginhash_pwd', $config["loginhash_pwd"], '', 15, 15, true); - - echo '
'; print_input_hidden ('update_settings', 1); print_table ($table); diff --git a/pandora_console/godmode/users/user_list.php b/pandora_console/godmode/users/user_list.php index 5c9a710156..91ded2c1e1 100644 --- a/pandora_console/godmode/users/user_list.php +++ b/pandora_console/godmode/users/user_list.php @@ -75,7 +75,7 @@ $result = get_db_all_rows_in_table ('tusuario'); foreach ($result as $row) { $data = array (); - $data[0] = print_username ($row["id_usuario"], true); + $data[0] = "".$row["id_usuario"].""; $data[1] = print_timestamp ($row["fecha_registro"], true); if ($row["nivel"] == 1) { $data[2] = ''; diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 717fea16dd..66bb7cb39a 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -17,6 +17,12 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +if (!isset ($config["auth"])) { + require_once ($config["homedir"]."/include/auth/mysql.php"); +} else { + require_once ($config["homedir"]."/include/auth/".$config["auth"]["scheme"].".php"); +} + /** * Check if login session variables are set. * diff --git a/pandora_console/pandoradb_migrate_20_to_21.sql b/pandora_console/pandoradb_migrate_20_to_21.sql index 86a581d31b..61b9f979eb 100644 --- a/pandora_console/pandoradb_migrate_20_to_21.sql +++ b/pandora_console/pandoradb_migrate_20_to_21.sql @@ -1,8 +1,6 @@ ALTER TABLE tagente ADD `custom_id` varchar(255) default ''; ALTER TABLE tagente_modulo ADD `custom_id` varchar(255) default ''; ALTER TABLE tgrupo ADD `custom_id` varchar(255) default ''; -ALTER TABLE talert_template_modules ADD `last_reference` bigint(20) NOT -NULL default '0'; ALTER TABLE `tagente_datos` DROP INDEX `data_index2`; ALTER TABLE `tagente_datos` DROP `timestamp`, DROP `id_agente`; @@ -18,6 +16,10 @@ ALTER TABLE `tagente_estado` ADD INDEX ( `last_execution_try` ); ALTER TABLE `tagente_modulo` ADD `min_warning` double(18,2) default 0; ALTER TABLE `tagente_modulo` ADD `max_warning` double(18,2) default 0; +ALTER TABLE `tagente_modulo` ADD `min_critical` double(18,2) default 0; +ALTER TABLE `tagente_modulo` ADD `max_critical` double(18,2) default 0; +ALTER TABLE `tagente_modulo` ADD `history_data` tinyint(1) unsigned default '1'; + ALTER TABLE `tagente_modulo` ADD `min_ff_event` int(4) unsigned default '0'; ALTER TABLE `tagente_modulo` ADD `delete_pending` int(1) unsigned default 0; @@ -25,8 +27,6 @@ ALTER TABLE `tagente_modulo` DROP INDEX `tam_plugin`; ALTER TABLE `tagente_modulo` DROP PRIMARY KEY , ADD PRIMARY KEY ( `id_agente_modulo` ); -ALTER TABLE `tagente_modulo` ADD INDEX `main_idx` -( `id_agente_modulo` , `id_agente` ); ALTER TABLE `tagent_access` DROP `timestamp`; CREATE TABLE IF NOT EXISTS `talert_commands` ( @@ -115,8 +115,6 @@ talert_template_modules(`id`) ON DELETE RESTRICT ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -ALTER TABLE tagente ADD `custom_id` varchar(255) default ''; - -- If you have custom stuff here, please make sure you manually -- migrate it.