diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 501b4cdee9..a8e71524a7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,136 @@ +2011-05-10 Juan Manuel Ramon + + * include/functions_graph.php + include/functions_users.php + include/functions_html.php + include/functions_menu.php + include/functions_messages.php + include/functions_modules.php + include/functions_reporting.php + include/functions_groups.php + include/functions_gis.php + include/auth/ldap.php + include/auth/mysql.php + include/functions_networkmap.php + include/functions_network_components.php + include/functions_visual_map.php + include/functions_profile.php + include/ajax/visual_console_builder.ajax.php + include/ajax/alert_list.ajax.php + include/ajax/module.php + include/functions_config.php + include/functions_api.php + include/functions_ui.php + include/functions_custom_graphs.php + include/fgraph.php + include/functions_agents.php + include/functions_db.php + include/functions_alerts.php + include/functions_reports.php + index.php + extensions/insert_data.php + extensions/agents_modules.php + extensions/resource_registration.php + extensions/resource_exportation.php + extensions/module_groups.php + operation/incidents/incident_detail.php + operation/search_modules.php + operation/agentes/status_monitor.php + operation/agentes/export_csv.php + operation/agentes/estado_ultimopaquete.php + operation/agentes/datos_agente.php + operation/agentes/alerts_status.php + operation/agentes/estado_generalagente.php + operation/agentes/estado_agente.php + operation/agentes/sla_view.php + operation/agentes/exportdata.php + operation/agentes/gis_view.php + operation/agentes/estado_monitores.php + operation/agentes/ver_agente.php + operation/agentes/graphs.php + operation/agentes/group_view.php + operation/search_agents.php + operation/snmpconsole/snmp_view.php + operation/users/user_edit.php + operation/integria_incidents/incident_detail.php + operation/gis_maps/render_view.php + operation/gis_maps/ajax.php + operation/events/events_rss.php + operation/events/export_csv.php + operation/events/events_list.php + operation/events/events_marquee.php + operation/events/events.php + operation/search_alerts.php + operation/messages/message.php + operation/search_users.php + mobile/operation/agents/monitor_status.php + mobile/operation/agents/view_agents.php + mobile/operation/agents/view_alerts.php + mobile/operation/agents/group_view.php + mobile/operation/events/events.php + ajax.php + general/ui/agents_list.php + godmode/groups/configure_group.php + godmode/groups/group_list.php + godmode/db/db_refine.php + godmode/db/db_info.php + godmode/db/db_purge.php + godmode/agentes/module_manager_editor_common.php + godmode/agentes/module_manager_editor_network.php + godmode/agentes/module_manager_editor_wmi.php + godmode/agentes/module_manager_editor_plugin.php + godmode/agentes/module_manager_editor_prediction.php + godmode/agentes/agent_conf_gis.php + godmode/agentes/module_manager.php + godmode/agentes/modificar_agente.php + godmode/agentes/configurar_agente.php + godmode/agentes/module_manager_editor.php + godmode/agentes/planned_downtime.php + godmode/agentes/manage_config_remote.php + godmode/agentes/agent_manager.php + godmode/servers/manage_recontask_form.php + godmode/alerts/alert_list.list.php + godmode/alerts/configure_alert_compound.php + godmode/alerts/alert_compounds.php + godmode/alerts/alert_list.php + godmode/alerts/configure_alert_template.php + godmode/alerts/alert_templates.php + godmode/alerts/configure_alert_action.php + godmode/alerts/alert_actions.php + godmode/alerts/alert_list.builder.php + godmode/setup/setup_auth.php + godmode/users/user_list.php + godmode/users/configure_user.php + godmode/users/configure_profile.php + godmode/massive/massive_add_alerts.php + godmode/massive/massive_copy_modules.php + godmode/massive/massive_delete_agents.php + godmode/massive/massive_enable_disable_alerts.php + godmode/massive/massive_delete_profiles.php + godmode/massive/massive_edit_agents.php + godmode/massive/massive_delete_action_alerts.php + godmode/massive/massive_delete_modules.php + godmode/massive/massive_add_profiles.php + godmode/massive/massive_delete_alerts.php + godmode/massive/massive_edit_modules.php + godmode/massive/massive_standby_alerts.php + godmode/massive/massive_add_action_alerts.php + godmode/reporting/visual_console_builder.wizard.php + godmode/reporting/reporting_builder.list_items.php + godmode/reporting/visual_console_builder.php + godmode/reporting/reporting_builder.main.php + godmode/reporting/visual_console_builder.data.php + godmode/reporting/visual_console_builder.elements.php + godmode/reporting/graph_builder.graph_editor.php + godmode/reporting/reporting_builder.php + godmode/reporting/reporting_builder.item_editor.php: Functions in + functions_profile.php, functions_agents.php, functions_users.php, + functions_massive_policies.php, functions_audit.php, functions_backup.php, + functions_collection.php, functions_skins.php, functions_enterprise.php, + functions_groups.php, functions_local_components.php, functions_metaconsole.php, + functions_policies.php, functions_reporting.php, functions_reporting_csv.php, + functions_reporting_pdf2.php, functions_services.php have their own prefixes. + 2011-05-10 Miguel de Dios * include/functions_profile.php: modified the function "create_user_profile" diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index 0b5a37050d..0e20fb890a 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -39,7 +39,7 @@ $page .= '.php'; $config["id_user"] = $_SESSION["id_usuario"]; $isFunctionSkins = enterprise_include_once ('include/functions_skins.php'); if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) - $config["relative_path"] = enterprise_hook('set_image_skin_path',array($config['id_user'])); + $config["relative_path"] = enterprise_hook('skins_set_image_skin_path',array($config['id_user'])); session_write_close (); if (file_exists ($page)) { require_once ($page); diff --git a/pandora_console/extensions/agents_modules.php b/pandora_console/extensions/agents_modules.php index 33d5fcfd9b..2e59494d5d 100644 --- a/pandora_console/extensions/agents_modules.php +++ b/pandora_console/extensions/agents_modules.php @@ -69,7 +69,7 @@ function mainAgentsModules() { $hor_offset = get_parameter('hor_offset', 0); $block = 20; - $groups = get_user_groups (); + $groups = users_get_groups (); $filter_module_groups = '
'; $filter_module_groups .= ''.__('Module group').''; @@ -115,7 +115,7 @@ function mainAgentsModules() { $agents = ''; if($group_id > 0) { - $agents = get_group_agents($group_id); + $agents = agents_get_group_agents($group_id); $agents = array_keys($agents); } @@ -125,7 +125,7 @@ function mainAgentsModules() { $filter_module_groups['id_module_group'] = $modulegroup; } - $all_modules = get_agent_modules($agents, false, $filter_module_groups, true, false); + $all_modules = agents_get_modules($agents, false, $filter_module_groups, true, false); $modules_by_name = array(); $name = ''; @@ -197,7 +197,7 @@ function mainAgentsModules() { foreach ($agents as $agent) { // Get stats for this group - $agent_status = get_agent_status($agent['id_agente']); + $agent_status = agents_get_status($agent['id_agente']); switch($agent_status) { case 4: // Alert fired status @@ -228,7 +228,7 @@ function mainAgentsModules() { $file_name = string2image(ui_print_truncate_text($agent['nombre'],19, false, true, false, '...'), 140, 15, 3, 0, $rowcolor, $textcolor, 4, 0); echo "".html_print_image($file_name, true, array('title' => $agent['nombre'])).""; - $agent_modules = get_agent_modules($agent['id_agente']); + $agent_modules = agents_get_modules($agent['id_agente']); $nmodules = 0; diff --git a/pandora_console/extensions/insert_data.php b/pandora_console/extensions/insert_data.php index 6bb53dfa9e..ab99632f7f 100644 --- a/pandora_console/extensions/insert_data.php +++ b/pandora_console/extensions/insert_data.php @@ -79,7 +79,7 @@ function mainInsertData() { if ($save) { - if (!check_acl($config['id_user'], get_agent_group(get_agent_id($id_agent)), "AW")) { + if (!check_acl($config['id_user'], agents_get_agent_group(agents_get_agent_id($id_agent)), "AW")) { ui_print_error_message(__('You haven\'t privileges for insert data in the agent.')); } else { @@ -122,7 +122,7 @@ function mainInsertData() { $table->data[1][0] = __('Module'); $modules = array (); if ($id_agent) - $modules = get_agent_modules ($id_agent, false, array("delete_pending" => 0)); + $modules = agents_get_modules ($id_agent, false, array("delete_pending" => 0)); $table->data[1][1] = html_print_select ($modules, 'id_agent_module', $id_agent_module, true, __('Select'), 0, true, false, true, '', ($id_agent === '')); $table->data[2][0] = __('Data'); diff --git a/pandora_console/extensions/module_groups.php b/pandora_console/extensions/module_groups.php index 8d02efbdb6..b7047baac0 100644 --- a/pandora_console/extensions/module_groups.php +++ b/pandora_console/extensions/module_groups.php @@ -27,7 +27,7 @@ if (is_ajax ()) { $id_agent_group = (int)get_parameter('id_agent_group'); if ($get_info_alert_module_group) { - $agents = get_group_agents($id_agent_group); + $agents = agents_get_group_agents($id_agent_group); if (!empty($agents)) { $alerts = agents_get_alerts_simple($agents); @@ -123,8 +123,8 @@ function mainModuleGroups() { echo "

" . __("This table shows in columns the modules group and in rows agents group. The cell shows all modules") . "

"; - $agentGroups = get_user_groups ($config['id_user'], "AR", false); - $modelGroups = get_all_model_groups(); + $agentGroups = users_get_groups ($config['id_user'], "AR", false); + $modelGroups = users_get_all_model_groups(); array_walk($modelGroups, 'translate'); //Translate all head titles to language is set foreach ($modelGroups as $i => $n) { @@ -159,7 +159,7 @@ function mainModuleGroups() { $rowsDB = db_get_all_rows_sql ($query); - $agents = get_group_agents($idAgentGroup); + $agents = agents_get_group_agents($idAgentGroup); if (!empty($agents)) { $alerts = agents_get_alerts_simple($agents); diff --git a/pandora_console/extensions/resource_exportation.php b/pandora_console/extensions/resource_exportation.php index 924e6ba208..ef45ffa392 100644 --- a/pandora_console/extensions/resource_exportation.php +++ b/pandora_console/extensions/resource_exportation.php @@ -103,12 +103,12 @@ function output_xml_report($id) { echo "" . io_safe_output($item['description']) . "\n"; echo "" . io_safe_output($item['period']) . "\n"; if ($item['id_agent'] != 0) { - $agent = get_agent_name($item['id_agent']); + $agent = agents_get_name($item['id_agent']); } if ($item['id_agent_module'] != 0) { $module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']); $id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $item['id_agent_module']); - $agent = get_agent_name($item['id_agent']); + $agent = agents_get_name($item['id_agent']); echo "\n"; } @@ -145,7 +145,7 @@ function output_xml_report($id) { foreach ($slas as $sla) { $module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']); $id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $sla['id_agent_module']); - $agent = get_agent_name($item['id_agent']); + $agent = agents_get_name($item['id_agent']); echo ""; echo "\n"; echo "\n"; @@ -268,13 +268,13 @@ function output_xml_visual_console($id) { } $agent = ''; if ($item['id_agent'] != 0) { - $agent = get_agent_name($item['id_agent']); + $agent = agents_get_name($item['id_agent']); } if (isset($item['id_agente_modulo'])) { if ($item['id_agente_modulo'] != 0) { $module = db_get_value('nombre', 'tagente_modulo', 'id_agente_modulo', $item['id_agente_modulo']); $id_agent = db_get_value('id_agente', 'tagente_modulo', 'id_agente_modulo', $item['id_agente_modulo']); - $agent = get_agent_name($id_agent); + $agent = agents_get_name($id_agent); echo "\n"; } diff --git a/pandora_console/extensions/resource_registration.php b/pandora_console/extensions/resource_registration.php index a18fb7660a..cc5fe19064 100644 --- a/pandora_console/extensions/resource_registration.php +++ b/pandora_console/extensions/resource_registration.php @@ -631,7 +631,7 @@ function process_upload_xml_component($xml) { $values = array('description' => $description, 'id_network_component_group' => $group, 'os_version' => $os_version); - $return = enterprise_hook('create_local_component', array($name, $data, $id_os, $values)); + $return = enterprise_hook('local_components_create_local_component', array($name, $data, $id_os, $values)); if ($return !== ENTERPRISE_NOT_HOOK) { $idComponent = $return; } diff --git a/pandora_console/general/ui/agents_list.php b/pandora_console/general/ui/agents_list.php index a31c66af6c..f3e6d60c4a 100644 --- a/pandora_console/general/ui/agents_list.php +++ b/pandora_console/general/ui/agents_list.php @@ -28,7 +28,7 @@ if (is_ajax ()) { if ($id_group > 0 && check_acl ($config['id_user'], $id_group, $access)) $filter['id_grupo'] = $id_group; else - $filter['id_grupo'] = array_keys (get_user_groups (false, $access)); + $filter['id_grupo'] = array_keys (users_get_groups (false, $access)); $fields = ''; if (isset ($_POST['fields'])) diff --git a/pandora_console/godmode/agentes/agent_conf_gis.php b/pandora_console/godmode/agentes/agent_conf_gis.php index e325f8e504..6ca4153a9a 100644 --- a/pandora_console/godmode/agentes/agent_conf_gis.php +++ b/pandora_console/godmode/agentes/agent_conf_gis.php @@ -28,7 +28,7 @@ echo "
"; $agentData = gis_get_data_last_position_agent($id_agente); $updateGisData = db_get_value('update_gis_data','tagente', 'id_agente', $id_agente); -$agent_name = get_agent_name($id_agente); +$agent_name = agents_get_name($id_agente); /* Map with the current position */ echo "
"; diff --git a/pandora_console/godmode/agentes/agent_manager.php b/pandora_console/godmode/agentes/agent_manager.php index 8e4216eb1c..b2a7644634 100644 --- a/pandora_console/godmode/agentes/agent_manager.php +++ b/pandora_console/godmode/agentes/agent_manager.php @@ -122,17 +122,17 @@ $table->data[1][1] = html_print_input_text ('direccion', $direccion_agente, '', if ($id_agente) { $table->data[1][1] .= '    '; - $ip_all = get_agent_addresses ($id_agente); + $ip_all = agents_get_addresses ($id_agente); $table->data[1][1] .= html_print_select ($ip_all, "address_list", $direccion_agente, '', '', 0, true); $table->data[1][1] .= " ". html_print_checkbox ("delete_ip", 1, false, true).__('Delete selected'); } -$groups = get_user_groups ($config["id_user"], "AR",false); -$agents = get_group_agents (array_keys ($groups)); +$groups = users_get_groups ($config["id_user"], "AR",false); +$agents = agents_get_group_agents (array_keys ($groups)); $table->data[2][0] = __('Parent'); -$table->data[2][1] = html_print_input_text_extended ('id_parent', get_agent_name ($id_parent), 'text-id_parent', '', 30, 100, false, '', +$table->data[2][1] = html_print_input_text_extended ('id_parent', agents_get_name ($id_parent), 'text-id_parent', '', 30, 100, false, '', array('style' => 'background: url(images/lightning.png) no-repeat right;'), true) . ' ' . __("Type at least two characters to search") . ''; diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index bf3f6cc090..5f517192c3 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -26,7 +26,7 @@ check_login (); $id_agente = (int) get_parameter ("id_agente"); $group = 0; if ($id_agente) - $group = get_agent_group ($id_agente); + $group = agents_get_agent_group ($id_agente); if (! check_acl ($config["id_user"], $group, "AW")) { db_pandora_audit("ACL Violation", @@ -121,7 +121,7 @@ if ($create_agent) { $comentarios = (string) get_parameter_post ("comentarios", ''); $modo = (int) get_parameter_post ("modo"); $id_parent = (string) get_parameter_post ("id_parent",''); - $id_parent = (int) get_agent_id ($id_parent); + $id_parent = (int) agents_get_agent_id ($id_parent); $server_name = (string) get_parameter_post ("server_name"); $id_os = (int) get_parameter_post ("id_os"); $disabled = (int) get_parameter_post ("disabled"); @@ -145,7 +145,7 @@ if ($create_agent) { $agent_creation_error = __('No agent name specified'); $agent_created_ok = 0; } - elseif (get_agent_id ($nombre_agente)) { + elseif (agents_get_agent_id ($nombre_agente)) { $agent_creation_error = __('There is already an agent in the database with this name'); $agent_created_ok = 0; } @@ -169,7 +169,7 @@ if ($create_agent) { array('id_field' => $key,'id_agent' => $id_agente, 'description' => $value)); } // Create address for this agent in taddress - agent_add_address ($id_agente, $direccion_agente); + agents_add_address ($id_agente, $direccion_agente); $agent_created_ok = true; @@ -310,7 +310,7 @@ if ($id_agente) { } } - ui_print_page_header (__('Agent configuration') . ' - ' . ui_print_truncate_text(get_agent_name ($id_agente), 25, false), "images/setup.png", false, "", true, $onheader); + ui_print_page_header (__('Agent configuration') . ' - ' . ui_print_truncate_text(agents_get_name ($id_agente), 25, false), "images/setup.png", false, "", true, $onheader); } // Create agent @@ -326,7 +326,7 @@ if ($delete_conf_file) { $correct = false; // Delete remote configuration if (isset ($config["remote_config"])) { - $agent_md5 = md5 (get_agent_name ($id_agente,'none'), FALSE); + $agent_md5 = md5 (agents_get_name ($id_agente,'none'), FALSE); if (file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5")) { // Agent remote configuration editor @@ -383,7 +383,7 @@ if ($update_agent) { // if modified some agent paramenter $nombre_agente = str_replace('`','‘',(string) get_parameter_post ("agente", "")); $direccion_agente = (string) get_parameter_post ("direccion", ''); $address_list = (string) get_parameter_post ("address_list", ''); - if ($address_list != $direccion_agente && $direccion_agente == get_agent_address ($id_agente) && $address_list != get_agent_address ($id_agente)) { + if ($address_list != $direccion_agente && $direccion_agente == agents_get_address ($id_agente) && $address_list != agents_get_address ($id_agente)) { //If we selected another IP in the drop down list to be 'primary': // a) field is not the same as selectbox // b) field has not changed from current IP @@ -399,7 +399,7 @@ if ($update_agent) { // if modified some agent paramenter $disabled = (bool) get_parameter_post ("disabled"); $server_name = (string) get_parameter_post ("server_name", ""); $id_parent = (string) get_parameter_post ("id_parent"); - $id_parent = (int) get_agent_id ($id_parent); + $id_parent = (int) agents_get_agent_id ($id_parent); $custom_id = (string) get_parameter_post ("custom_id", ""); $cascade_protection = (int) get_parameter_post ("cascade_protection", 0); $icon_path = (string) get_parameter_post ("icon_path",''); @@ -436,18 +436,18 @@ if ($update_agent) { // if modified some agent paramenter echo '

'.__('No agent name specified').'

'; //If there is an agent with the same name, but a different ID } - elseif (get_agent_id ($nombre_agente) > 0 && get_agent_id ($nombre_agente) != $id_agente) { + elseif (agents_get_agent_id ($nombre_agente) > 0 && agents_get_agent_id ($nombre_agente) != $id_agente) { echo '

'.__('There is already an agent in the database with this name').'

'; } else { //If different IP is specified than previous, add the IP - if ($direccion_agente != '' && $direccion_agente != get_agent_address ($id_agente)) - agent_add_address ($id_agente, $direccion_agente); + if ($direccion_agente != '' && $direccion_agente != agents_get_address ($id_agente)) + agents_add_address ($id_agente, $direccion_agente); //If IP is set for deletion, delete first if (isset ($_POST["delete_ip"])) { $delete_ip = get_parameter_post ("address_list"); - agent_delete_address ($id_agente, $delete_ip); + agents_delete_address ($id_agente, $delete_ip); } $result = db_process_sql_update ('tagente', @@ -491,7 +491,7 @@ if ($update_agent) { // if modified some agent paramenter // This should be at the end of all operation checks, to read the changes - $id_agente doesn't have to be retrieved if ($id_agente) { //This has been done in the beginning of the page, but if an agent was created, this id might change - $id_grupo = get_agent_group ($id_agente); + $id_grupo = agents_get_agent_group ($id_agente); if (check_acl ($config["id_user"], $id_grupo, "AW") != 1) { db_pandora_audit("ACL Violation","Trying to admin an agent without access"); require ("general/noaccess.php"); @@ -530,7 +530,7 @@ $edit_module = (bool) get_parameter ('edit_module'); // GET DATA for MODULE UPDATE OR MODULE INSERT if ($update_module || $create_module) { - $id_grupo = get_agent_group ($id_agente); + $id_grupo = agents_get_agent_group ($id_agente); if (! check_acl ($config["id_user"], $id_grupo, "AW")) { db_pandora_audit("ACL Violation", @@ -574,7 +574,7 @@ if ($update_module || $create_module) { enterprise_hook ('get_service_parameters'); - $agent_name = (string) get_parameter('agent_name',get_agent_name ($id_agente)); + $agent_name = (string) get_parameter('agent_name',agents_get_name ($id_agente)); $snmp_community = (string) get_parameter ('snmp_community'); $snmp_oid = (string) get_parameter ('snmp_oid'); @@ -621,7 +621,7 @@ if ($update_module || $create_module) { // Make changes in the conf file if necessary enterprise_include_once('include/functions_config_agents.php'); - enterprise_hook('write_module_in_conf', array($id_agente, io_safe_output($old_configuration_data), io_safe_output($configuration_data))); + enterprise_hook('config_agents_write_module_in_conf', array($id_agente, io_safe_output($old_configuration_data), io_safe_output($configuration_data))); } // MODULE UPDATE @@ -768,7 +768,7 @@ if ($create_module) { if ($delete_module) { // DELETE agent module ! $id_borrar_modulo = (int) get_parameter_get ("delete_module",0); $module_data = db_get_row ('tagente_modulo', 'id_agente_modulo', $id_borrar_modulo); - $id_grupo = (int) get_agent_group($id_agente); + $id_grupo = (int) agents_get_agent_group($id_agente); if (! check_acl ($config["id_user"], $id_grupo, "AW")) { db_pandora_audit("ACL Violation", @@ -785,7 +785,7 @@ if ($delete_module) { // DELETE agent module ! } enterprise_include_once('include/functions_config_agents.php'); - enterprise_hook('deleteLocalModuleInConf', array(modules_get_agentmodule_agent($id_borrar_modulo), modules_get_agentmodule_name($id_borrar_modulo))); + enterprise_hook('config_agents_delete_module_in_conf', array(modules_get_agentmodule_agent($id_borrar_modulo), modules_get_agentmodule_name($id_borrar_modulo))); //Init transaction $error = 0; diff --git a/pandora_console/godmode/agentes/manage_config_remote.php b/pandora_console/godmode/agentes/manage_config_remote.php index 049b5ece3a..5b5807bb8a 100644 --- a/pandora_console/godmode/agentes/manage_config_remote.php +++ b/pandora_console/godmode/agentes/manage_config_remote.php @@ -57,7 +57,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) { $id_origen = get_parameter ("origen"); // Security check here - if (!user_access_to_agent ($id_origen)) { + if (!users_access_to_agent ($id_origen)) { db_pandora_audit("ACL Violation", "Trying to forge a source agent in remote config tool"); require ("general/noaccess.php"); exit; @@ -71,14 +71,14 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) { $id_agente = $destino[$a]; // Security check here - if (!user_access_to_agent ($id_agente)){ + if (!users_access_to_agent ($id_agente)){ db_pandora_audit("ACL Violation", "Trying to forge a source agent in remote config tool"); require ("general/noaccess.php"); exit; } - $agent_name_src = get_agent_name($id_origen, ""); - $agent_name_dst = get_agent_name($id_agente, ""); + $agent_name_src = agents_get_name($id_origen, ""); + $agent_name_dst = agents_get_name($id_agente, ""); echo "

".__('Making copy of configuration file for')." [".$agent_name_src."] ".__('to')." [".$agent_name_dst."]"; $agent_md5_src = md5($agent_name_src); @@ -104,7 +104,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) { // Source group echo ''. __('Source group'). '

'; - $group_select = get_user_groups ($config['id_user']); + $group_select = users_get_groups ($config['id_user']); $grouplist = implode (',', array_keys ($group_select)); echo html_print_select_groups($config['id_user'], "AR", true, 'id_group', $id_group, '', '', '', true); diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 57c4df325a..18a14fa87f 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -52,11 +52,11 @@ $agent_to_delete = (int)get_parameter('borrar_agente'); if (!empty($agent_to_delete)) { $id_agente = $agent_to_delete; - $agent_name = get_agent_name ($id_agente); - $id_grupo = get_agent_group($id_agente); + $agent_name = agents_get_name ($id_agente); + $id_grupo = agents_get_agent_group($id_agente); if (check_acl ($config["id_user"], $id_grupo, "AW")==1) { $id_agentes[0] = $id_agente; - delete_agent($id_agentes); + agents_delete_agent($id_agentes); db_pandora_audit("Agent management", "Delete Agent " . $agent_name); } else { diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index e110c4ec0d..8c918a0ca8 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -84,7 +84,7 @@ if ($multiple_delete) { $id_agent_modules_delete = (array)get_parameter('id_delete'); foreach($id_agent_modules_delete as $id_agent_module_del) { - $id_grupo = (int) get_agent_group($id_agente); + $id_grupo = (int) agents_get_agent_group($id_agente); if (! check_acl ($config["id_user"], $id_grupo, "AW")) { db_pandora_audit("ACL Violation", @@ -101,7 +101,7 @@ if ($multiple_delete) { } enterprise_include_once('include/functions_config_agents.php'); - enterprise_hook('deleteLocalModuleInConf', array(modules_get_agentmodule_agent($id_agent_module_del), modules_get_agentmodule_name($id_agent_module_del))); + enterprise_hook('config_agents_delete_module_in_conf', array(modules_get_agentmodule_agent($id_agent_module_del), modules_get_agentmodule_name($id_agent_module_del))); //Init transaction $error = 0; @@ -299,7 +299,7 @@ $table->align[2] = 'center'; $table->align[7] = 'left'; $table->data = array (); -$agent_interval = get_agent_interval ($id_agente); +$agent_interval = agents_get_interval ($id_agente); $last_modulegroup = "0"; //Extract the ids only numeric modules for after show the normalize link. @@ -344,14 +344,14 @@ foreach ($modules as $module) { $data[0] .= ''; if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { - $policyInfo = infoModulePolicy($module['id_agente_modulo']); + $policyInfo = policies_info_module_policy($module['id_agente_modulo']); if ($policyInfo === false) $data[1] = ''; else { - $linked = isModuleLinked($module['id_agente_modulo']); + $linked = policies_is_module_linked($module['id_agente_modulo']); $adopt = false; - if (isModuleAdopt($module['id_agente_modulo'])) { + if (policies_is_module_adopt($module['id_agente_modulo'])) { $adopt = true; } diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 2c5229725d..eb58b40967 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -51,7 +51,7 @@ if (is_ajax ()) { require_once ($config['homedir'].'/'.ENTERPRISE_DIR.'/include/functions_local_components.php'); $id_module_group = (int) get_parameter ('id_module_component_group'); - $localComponents = get_local_components(array('id_network_component_group' => $id_module_group), array('id', 'name')); + $localComponents = local_components_get_local_components(array('id_network_component_group' => $id_module_group), array('id', 'name')); echo json_encode($localComponents); return; @@ -65,7 +65,7 @@ if (is_ajax ()) { $component[$index] = html_entity_decode($element, ENT_QUOTES, "UTF-8"); } - $typeName = parseLocalModuleExtractValue('module_type',$component['data']); + $typeName = local_components_parse_module_extract_value('module_type',$component['data']); switch ($config["dbtype"]) { case "mysql": @@ -130,7 +130,7 @@ if ($id_agent_module) { $min = $module['min']; $interval = $module['module_interval']; if ($interval == 0) { - $interval = get_agent_interval ($id_agente); + $interval = agents_get_interval ($id_agente); } $tcp_port = $module['tcp_port']; $tcp_send = $module['tcp_send']; @@ -155,7 +155,7 @@ if ($id_agent_module) { $ip_target = $module['ip_target']; if (empty ($ip_target)) { - $ip_target = get_agent_address ($id_agente); + $ip_target = agents_get_address ($id_agente); } $disabled = $module['disabled']; $id_export = $module['id_export']; @@ -201,7 +201,7 @@ else { else $snmp_community = "public"; $snmp_oid = ''; - $ip_target = get_agent_address ($id_agente); + $ip_target = agents_get_address ($id_agente); $plugin_user = ''; $plugin_pass = ''; $plugin_parameter = ''; @@ -229,14 +229,14 @@ $relink_policy = get_parameter('relink_policy', 0); $unlink_policy = get_parameter('unlink_policy', 0); if($relink_policy) { - $result = relink_module_policy($id_agent_module); + $result = policies_relink_module($id_agent_module); ui_print_result_message($result, 'Module relinked to the policy successful'); db_pandora_audit("Agent management", "Re-link module " . $id_agent_module); } if($unlink_policy) { - $result = unlink_module_policy($id_agent_module); + $result = policies_unlink_module($id_agent_module); ui_print_result_message($result, 'Module unlinked from the policy successful'); db_pandora_audit("Agent management", "Unlink module " . $id_agent_module); @@ -247,7 +247,7 @@ switch ($moduletype) { case 1: $moduletype = 1; // Has remote configuration ? - $agent_md5 = md5 (get_agent_name($id_agente), false); + $agent_md5 = md5 (agents_get_name($id_agente), false); $remote_conf = file_exists ($config["remote_config"]."/md5/".$agent_md5.".md5"); /* Categories is an array containing the allowed module types @@ -258,7 +258,7 @@ switch ($moduletype) { if ($config['enterprise_installed'] && $remote_conf) { if($id_agent_module) { enterprise_include_once('include/functions_config_agents.php'); - $configuration_data = enterprise_hook('get_module_from_conf', array($id_agente, get_agentmodule_name($id_agent_module))); + $configuration_data = enterprise_hook('config_agents_get_module_from_conf', array($id_agente, get_agentmodule_name($id_agent_module))); } enterprise_include ('godmode/agentes/module_manager_editor_data.php'); } @@ -316,8 +316,8 @@ if (isset ($extra_title)) echo ''; if($config['enterprise_installed'] && $id_agent_module) { - if (isModuleInPolicy($id_agent_module)) { - add_policy_linkation($id_agent_module); + if (policies_is_module_in_policy($id_agent_module)) { + policies_add_policy_linkation($id_agent_module); } } diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 38583857da..184330ce4e 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -101,7 +101,7 @@ $disabledTextBecauseInPolicy = ''; $page = get_parameter('page', ''); if (strstr($page, "policy_modules") === false && $id_agent_module) { if ($config['enterprise_installed']) - $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module); + $disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module); else $disabledBecauseInPolicy = false; if ($disabledBecauseInPolicy) diff --git a/pandora_console/godmode/agentes/module_manager_editor_network.php b/pandora_console/godmode/agentes/module_manager_editor_network.php index 59aff4cc38..f826de9aa7 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_network.php +++ b/pandora_console/godmode/agentes/module_manager_editor_network.php @@ -21,7 +21,7 @@ $page = get_parameter('page', ''); if (strstr($page, "policy_modules") === false) { if ($config['enterprise_installed']) { - $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module); + $disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module); } else @@ -60,7 +60,7 @@ $data[0] = __('SNMP community'); $adopt = false; if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK && isset($id_agent_module)) { - $adopt = isModuleAdopt($id_agent_module); + $adopt = policies_is_module_adopt($id_agent_module); } if (!$adopt) { diff --git a/pandora_console/godmode/agentes/module_manager_editor_plugin.php b/pandora_console/godmode/agentes/module_manager_editor_plugin.php index 7e83c6083b..91c7125e87 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_plugin.php +++ b/pandora_console/godmode/agentes/module_manager_editor_plugin.php @@ -20,7 +20,7 @@ $disabledTextBecauseInPolicy = ''; $page = get_parameter('page', ''); if (strstr($page, "policy_modules") === false) { if ($config['enterprise_installed']) - $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module); + $disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module); else $disabledBecauseInPolicy = false; if ($disabledBecauseInPolicy) diff --git a/pandora_console/godmode/agentes/module_manager_editor_prediction.php b/pandora_console/godmode/agentes/module_manager_editor_prediction.php index 176eb37eda..5dd14def5f 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_prediction.php +++ b/pandora_console/godmode/agentes/module_manager_editor_prediction.php @@ -20,7 +20,7 @@ $disabledBecauseInPolicy = false; $disabledTextBecauseInPolicy = ''; $page = get_parameter('page', ''); $id_agente = get_parameter('id_agente', ''); -$agent_name = get_parameter('agent_name', get_agent_name($id_agente)); +$agent_name = get_parameter('agent_name', agents_get_name($id_agente)); $id_agente_modulo= get_parameter('id_agent_module',0); $sql = 'SELECT * FROM tagente_modulo WHERE id_agente_modulo = '.$id_agente_modulo; $row = db_get_row_sql($sql); @@ -38,7 +38,7 @@ else { } if (strstr($page, "policy_modules") === false) { if ($config['enterprise_installed']) - $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module); + $disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module); else $disabledBecauseInPolicy = false; if ($disabledBecauseInPolicy) diff --git a/pandora_console/godmode/agentes/module_manager_editor_wmi.php b/pandora_console/godmode/agentes/module_manager_editor_wmi.php index f755be40f4..ac2a596203 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_wmi.php +++ b/pandora_console/godmode/agentes/module_manager_editor_wmi.php @@ -19,7 +19,7 @@ $disabledTextBecauseInPolicy = ''; $page = get_parameter('page', ''); if (strstr($page, "policy_modules") === false) { if ($config['enterprise_installed']) - $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module) && isModuleLinked($id_agent_module); + $disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module); else $disabledBecauseInPolicy = false; if ($disabledBecauseInPolicy) diff --git a/pandora_console/godmode/agentes/planned_downtime.php b/pandora_console/godmode/agentes/planned_downtime.php index 5fb442fcd0..702c16230d 100644 --- a/pandora_console/godmode/agentes/planned_downtime.php +++ b/pandora_console/godmode/agentes/planned_downtime.php @@ -49,7 +49,7 @@ $id_downtime = (int) get_parameter ('id_downtime',0); $insert_downtime_agent = (int) get_parameter ("insert_downtime_agent", 0); $delete_downtime_agent = (int) get_parameter ("delete_downtime_agent", 0); -$groups = get_user_groups (); +$groups = users_get_groups (); // Header ui_print_page_header (__("Planned Downtime"), "images/god1.png", false, "", true, ""); diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php index 261ee38097..f9ef8ebb20 100644 --- a/pandora_console/godmode/alerts/alert_actions.php +++ b/pandora_console/godmode/alerts/alert_actions.php @@ -71,9 +71,9 @@ if ($copy_action) { }else{ $own_info = get_user_info ($config['id_user']); if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) - $own_groups = array_keys(get_user_groups($config['id_user'], "LM")); + $own_groups = array_keys(users_get_groups($config['id_user'], "LM")); else - $own_groups = array_keys(get_user_groups($config['id_user'], "LM", false)); + $own_groups = array_keys(users_get_groups($config['id_user'], "LM", false)); $is_in_group = in_array($al_action['id_group'], $own_groups); // Then action group have to be in his own groups if ($is_in_group) @@ -215,9 +215,9 @@ if ($delete_action) { else{ $own_info = get_user_info ($config['id_user']); if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) - $own_groups = array_keys(get_user_groups($config['id_user'], "LM")); + $own_groups = array_keys(users_get_groups($config['id_user'], "LM")); else - $own_groups = array_keys(get_user_groups($config['id_user'], "LM", false)); + $own_groups = array_keys(users_get_groups($config['id_user'], "LM", false)); $is_in_group = in_array($al_action['id_group'], $own_groups); // Then action group have to be in his own groups if ($is_in_group) diff --git a/pandora_console/godmode/alerts/alert_compounds.php b/pandora_console/godmode/alerts/alert_compounds.php index 1fa42f911d..1e6805694b 100644 --- a/pandora_console/godmode/alerts/alert_compounds.php +++ b/pandora_console/godmode/alerts/alert_compounds.php @@ -40,11 +40,11 @@ if ($id_agent) if ($search != ''); $url .= '&search='.$search; -$groups = get_user_groups (0, 'LM'); +$groups = users_get_groups (0, 'LM'); if ($id_group > 0 && isset ($groups[$id_group])) - $agents = get_group_agents ($id_group, false, "none"); + $agents = agents_get_group_agents ($id_group, false, "none"); else - $agents = get_group_agents (array_keys ($groups), false, "none"); + $agents = agents_get_group_agents (array_keys ($groups), false, "none"); $update_compound = (bool) get_parameter ('update_compound'); $delete_alert = (int) get_parameter ('delete_alert'); @@ -233,7 +233,7 @@ foreach ($id_alerts as $alert) { $data[1] = ''; $data[1] .= $alert['name']; $data[1] .= ''; - $data[2] = get_agent_name ($alert['id_agent']); + $data[2] = agents_get_name ($alert['id_agent']); $data[3] = ''; $data[3] .= html_print_image("images/cross.png", true, array("title" => __('Delete'))); diff --git a/pandora_console/godmode/alerts/alert_list.builder.php b/pandora_console/godmode/alerts/alert_list.builder.php index 620204d630..b283696f93 100644 --- a/pandora_console/godmode/alerts/alert_list.builder.php +++ b/pandora_console/godmode/alerts/alert_list.builder.php @@ -55,7 +55,7 @@ if (! $id_agente) { $table->data[0][0] = __('Module'); $modules = array (); if ($id_agente) - $modules = get_agent_modules ($id_agente, false, array("delete_pending" => 0)); + $modules = agents_get_modules ($id_agente, false, array("delete_pending" => 0)); $table->data[0][1] = html_print_select ($modules, 'id_agent_module', 0, true, __('Select'), 0, true, false, true, '', ($id_agente == 0)); @@ -71,7 +71,7 @@ $own_info = get_user_info ($config['id_user']); if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) $templates = alerts_get_alert_templates (false, array ('id', 'name')); else{ - $usr_groups = get_user_groups($config['id_user'], 'LW', true); + $usr_groups = users_get_groups($config['id_user'], 'LW', true); $filter_groups = ''; $filter_groups = implode(',', array_keys($usr_groups)); $templates = alerts_get_alert_templates (array ('id_group IN (' . $filter_groups . ')'), array ('id', 'name')); diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index 92b2a70c39..5231c58d13 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -416,7 +416,7 @@ foreach ($simple_alerts as $alert) { $data[2] = ''; if ($alert['disabled']) $data[2] .= ''; - $data[2] .= get_agent_name ($id_agent); + $data[2] .= agents_get_name ($id_agent); if ($alert['disabled']) $data[2] .= ''; $data[2] .= ''; @@ -431,7 +431,7 @@ foreach ($simple_alerts as $alert) { $data[4] .= ""; if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { - $policyInfo = isAlertInPolicy2($alert['id'], false); + $policyInfo = policies_is_alert_in_policy2($alert['id'], false); if ($policyInfo === false) $data[5] = ''; else { @@ -505,7 +505,7 @@ foreach ($simple_alerts as $alert) { $data[6] .= html_print_input_hidden ('add_action', 1, true); $data[6] .= html_print_input_hidden ('id_alert_module', $alert['id'], true); $own_info = get_user_info($config['id_user']); - $own_groups = get_user_groups($config['id_user'], 'LW', $own_info['is_admin']); + $own_groups = users_get_groups($config['id_user'], 'LW', $own_info['is_admin']); $filter_groups = ''; $filter_groups = implode(',', array_keys($own_groups)); $actions = alerts_get_alert_actions_filter(true, 'id_group IN (' . $filter_groups . ')'); diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index f8de18f286..46a7d359d1 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -33,7 +33,7 @@ $isFunctionPolicies = enterprise_include ('include/functions_policies.php'); $id_group = 0; /* Check if this page is included from a agent edition */ if (isset ($id_agente)) { - $id_group = get_agent_group ($id_agente); + $id_group = agents_get_agent_group ($id_agente); } else { $id_agente = 0; @@ -78,7 +78,7 @@ if ($create_alert) { $alert_template_name = db_get_value ("name", "talert_templates","id", $id_alert_template); $module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); - $agent_name = get_agent_name (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); + $agent_name = agents_get_name (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); // Audit the creation only when the alert creation is correct if($id) { @@ -114,7 +114,7 @@ if ($delete_alert) { $id_agent_module = $temp["id_agent_module"]; $alert_template_name = db_get_value ("name", "talert_templates","id", $id_alert_template); $module_name = db_get_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); - $agent_name = get_agent_name (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); + $agent_name = agents_get_name (db_get_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); $result = alerts_delete_alert_agent_module ($id_alert_agent_module); @@ -231,10 +231,10 @@ if ($standbyoff_alert) { } if ($id_agente) { - $agents = array ($id_agente => get_agent_name ($id_agente)); + $agents = array ($id_agente => agents_get_name ($id_agente)); if ($group == 0) { - $groups = get_user_groups (); + $groups = users_get_groups (); } else { $groups = array(0 => __('All')); @@ -270,12 +270,12 @@ else { switch ($tab) { case 'list': if ($group == 0) { - $groups = get_user_groups (); + $groups = users_get_groups (); } else { $groups = array(0 => __('All')); } - $agents = get_group_agents (array_keys ($groups), false, "none"); + $agents = agents_get_group_agents (array_keys ($groups), false, "none"); require_once('godmode/alerts/alert_list.list.php'); @@ -283,7 +283,7 @@ else { break; case 'builder': if ($group == 0) { - $groups = get_user_groups (); + $groups = users_get_groups (); } else { $groups = array(0 => __('All')); diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index 96f0d778f8..8c80fb3996 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -153,9 +153,9 @@ if ($delete_template) { }else{ $own_info = get_user_info ($config['id_user']); if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) - $own_groups = array_keys(get_user_groups($config['id_user'], "LM")); + $own_groups = array_keys(users_get_groups($config['id_user'], "LM")); else - $own_groups = array_keys(get_user_groups($config['id_user'], "LM", false)); + $own_groups = array_keys(users_get_groups($config['id_user'], "LM", false)); $is_in_group = in_array($al_template['id_group'], $own_groups); // Then template group have to be is his own groups if ($is_in_group) diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index cf7dccf5cd..e69525437d 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -48,9 +48,9 @@ if ($al_action !== false){ }else{ $own_info = get_user_info ($config['id_user']); if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) - $own_groups = array_keys(get_user_groups($config['id_user'], "LM")); + $own_groups = array_keys(users_get_groups($config['id_user'], "LM")); else - $own_groups = array_keys(get_user_groups($config['id_user'], "LM", false)); + $own_groups = array_keys(users_get_groups($config['id_user'], "LM", false)); $is_in_group = in_array($al_action['id_group'], $own_groups); // Then action group have to be in his own groups if ($is_in_group) @@ -97,7 +97,7 @@ $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true); $table->data[1][0] = __('Group'); -$groups = get_user_groups (); +$groups = users_get_groups (); $own_info = get_user_info ($config['id_user']); // Only display group "All" if user is administrator or has "PM" privileges if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) diff --git a/pandora_console/godmode/alerts/configure_alert_compound.php b/pandora_console/godmode/alerts/configure_alert_compound.php index 98c580a39e..8597abbbf8 100644 --- a/pandora_console/godmode/alerts/configure_alert_compound.php +++ b/pandora_console/godmode/alerts/configure_alert_compound.php @@ -228,7 +228,7 @@ if ($id && ! $create_compound) { $field2_recovery = $compound['field2_recovery']; $field3_recovery = $compound['field3_recovery']; $id_agent = $compound['id_agent']; - $id_group = get_agent_group ($id_agent); + $id_group = agents_get_agent_group ($id_agent); if (! check_acl ($config['id_user'], $id_group, "AW")) { db_pandora_audit("ACL Violation", "Trying to access Alert Management"); @@ -278,7 +278,7 @@ if ($update_compound) { print_alert_compound_steps ($step, $id); -$groups = get_user_groups (); +$groups = users_get_groups (); $table->id = 'compound'; $table->width = '90%'; @@ -438,7 +438,7 @@ if ($step == 2) { $table->data[0][1] = html_print_input_text ('name', $name, '', 35, 255, true); $table->data[1][0] = __('Assigned to'); - $table->data[1][1] = html_print_select (get_group_agents (array_keys ($groups)), + $table->data[1][1] = html_print_select (agents_get_group_agents (array_keys ($groups)), 'id_agent', $id_agent, '', __('Select'), 0, true); $table->data[2][0] = __('Description'); $table->data[2][1] = html_print_textarea ('description', 10, 30, @@ -475,8 +475,8 @@ if ($step == 2) { $data[0] = ''; $data[0] .= html_print_image("images/delete.png", true); $data[0] .= ''; - $idAgent = get_agent_module_id($alert['id_agent_module']); - $nameAgent = get_agent_name($idAgent); + $idAgent = agents_get_module_id($alert['id_agent_module']); + $nameAgent = agents_get_name($idAgent); $data[1] = '' . $nameAgent . ''; $data[2] = alerts_get_alert_template_name ($alert['id_alert_template']); $data[3] = modules_get_agentmodule_name ($alert['id_agent_module']); @@ -541,7 +541,7 @@ if ($step == 1) { $table->data[0][1] = html_print_select_groups(false, "AR", true, 'search_id_group', $id_group, false, '', '', true); $table->data[0][2] = __('Agent'); - $table->data[0][3] = html_print_select (get_group_agents ($id_group, false, "none"), + $table->data[0][3] = html_print_select (agents_get_group_agents ($id_group, false, "none"), 'search_id_agent', $id_agent, false, __('Select'), 0, true); $table->data[0][3] .= '