diff --git a/pandora_console/extras/mr/42.sql b/pandora_console/extras/mr/42.sql index 26f20e0f0a..f4bed54d16 100644 --- a/pandora_console/extras/mr/42.sql +++ b/pandora_console/extras/mr/42.sql @@ -31,4 +31,6 @@ ALTER TABLE `treport` ADD COLUMN `index_render` tinyint(1) NOT NULL DEFAULT 1; ALTER TABLE `treport_template` ADD COLUMN `cover_page_render` tinyint(1) NOT NULL DEFAULT 1; ALTER TABLE `treport_template` ADD COLUMN `index_render` tinyint(1) NOT NULL DEFAULT 1; +UPDATE `tconfig` SET value = '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}' WHERE token = 'post_process_custom_values'; + COMMIT; \ No newline at end of file diff --git a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql index 664a7749e1..b1e8f60aad 100644 --- a/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_6.0_to_7.0.mysql.sql @@ -1405,6 +1405,7 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_type', ''); INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_status', ''); INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_title', ''); INSERT INTO `tconfig` (`token`, `value`) VALUES ('cr_incident_content', ''); +INSERT INTO `tconfig` (`token`, `value`) VALUES ('post_process_custom_values', '{"0.00000038580247":"Seconds to months","0.00000165343915":"Seconds to weeks","0.00001157407407":"Seconds to days","0.01666666666667":"Seconds to minutes","0.00000000093132":"Bytes to Gigabytes","0.00000095367432":"Bytes to Megabytes","0.00097656250000":"Bytes to Kilobytes","0.00000001653439":"Timeticks to weeks","0.00000011574074":"Timeticks to days"}'); -- --------------------------------------------------------------------- -- Table `tconfig_os` diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index f4014de907..d1c7ae5224 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -149,7 +149,7 @@ if (is_ajax()) { ui_require_javascript_file('openlayers.pandora'); -$new_agent = (bool) get_parameter('new_agent'); +$new_agent = (empty($id_agente)) ? true : false; if (! isset($id_agente) && ! $new_agent) { db_pandora_audit('ACL Violation', 'Trying to access agent manager witout an agent'); @@ -1222,6 +1222,7 @@ ui_require_jquery_file('bgiframe'); $(document).ready (function() { + var $id_agent = ''; var previous_primary_group_select; $("#grupo").on('focus', function () { previous_primary_group_select = this.value; @@ -1276,12 +1277,14 @@ ui_require_jquery_file('bgiframe'); } }); - paint_qrcode( - "", - "#qr_code_agent_view", - 128, - 128 - ); + if (typeof $id_agent !== 'undefined' && $id_agent !== '0') { + paint_qrcode( + "", + "#qr_code_agent_view", + 128, + 128 + ); + } $("#text-agente").prop('readonly', true); }); diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 8238d1636b..77d8f06b46 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -754,7 +754,6 @@ if (check_acl($config['id_user'], 0, 'AW')) { // Create agent button. echo '