From c6d29ea60ed57927d7ce3afbaeba80be084704a9 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 14 Dec 2023 16:59:39 +0100 Subject: [PATCH] #12435 external link users fix --- pandora_console/extras/mr/68.sql | 2 ++ pandora_console/godmode/users/configure_user.php | 4 ++-- pandora_console/godmode/users/user_management.php | 2 +- pandora_console/pandoradb.sql | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pandora_console/extras/mr/68.sql b/pandora_console/extras/mr/68.sql index 3095941187..e988817a54 100644 --- a/pandora_console/extras/mr/68.sql +++ b/pandora_console/extras/mr/68.sql @@ -1,5 +1,7 @@ START TRANSACTION; +ALTER TABLE `tusuario` CHANGE COLUMN `metaconsole_data_section` `metaconsole_data_section` TEXT NOT NULL DEFAULT '' ; + DELETE FROM `twelcome_tip` WHERE `title` = 'Automatic agent provision system'; INSERT INTO `twelcome_tip` (`id_lang`,`id_profile`,`title`,`text`,`url`,`enable`) VALUES ('en_GB',0,'Automatic agent provision system','The agent self-provisioning system allows an agent recently entered into the system to automatically apply changes to their configuration (such as moving them from group, assigning them certain values in custom fields) and of course applying certain monitoring policies. It is one of the most powerful functionalities, aimed at managing very large system parks.','https://pandorafms.com/manual/start?id=en/documentation/02_installation/05_configuration_agents#conf',1); diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 83e54f24c5..dbca522db4 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -427,7 +427,7 @@ if ($create_user === true) { } else if ($values['section'] === HOME_SCREEN_OTHER) { $values['data_section'] = get_parameter('data_section_other'); } else if (io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) { - $values['data_section'] = get_parameter('data_section_external'); + $values['data_section'] = get_parameter('data_section'); } // $values['section'] = $homeScreenValues[$values['section']]; @@ -727,7 +727,7 @@ if ($update_user) { } else if ($values['section'] === HOME_SCREEN_OTHER) { $values['data_section'] = get_parameter('data_section_other'); } else if (io_safe_output($values['section']) === HOME_SCREEN_EXTERNAL_LINK) { - $values['data_section'] = get_parameter('data_section_external'); + $values['data_section'] = get_parameter('data_section'); } // $values['section'] = $homeScreenValues[$values['section']]; diff --git a/pandora_console/godmode/users/user_management.php b/pandora_console/godmode/users/user_management.php index b1212c11ec..2f8aecd47e 100644 --- a/pandora_console/godmode/users/user_management.php +++ b/pandora_console/godmode/users/user_management.php @@ -118,7 +118,7 @@ $customHomeScreenAddition[HOME_SCREEN_EXTERNAL_LINK] = html_print_input_text( $user_info['data_section'], '', 60, - 255, + 999, true ); $customHomeScreenDataField = ''; diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 56e49ad467..a4df08742c 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -1292,7 +1292,7 @@ CREATE TABLE IF NOT EXISTS `tusuario` ( `section` TEXT, `data_section` TEXT, `metaconsole_section` VARCHAR(255) NOT NULL DEFAULT 'Default', - `metaconsole_data_section` VARCHAR(255) NOT NULL DEFAULT '', + `metaconsole_data_section` TEXT, `force_change_pass` TINYINT UNSIGNED NOT NULL DEFAULT 0, `last_pass_change` DATETIME, `last_failed_login` DATETIME,