From 9f287deea837e8a5f478c86ba5e8a08b47f84748 Mon Sep 17 00:00:00 2001 From: slerena Date: Tue, 14 Feb 2012 11:11:38 +0000 Subject: [PATCH] 2012-02-14 Sancho Lerena * include/config_process.php: updated build & version. * operation/search_agents.php: Fixed bug: icon to manage agent * operation/search_results.php: Fixed bug: search with blank spaces, again another HTML entity problem :( git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5588 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 +++++++++ pandora_console/include/config_process.php | 4 ++-- pandora_console/operation/search_agents.php | 3 ++- pandora_console/operation/search_results.php | 10 ++++++---- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index bd86d9b368..6f6376c6b9 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,12 @@ +2012-02-14 Sancho Lerena + + * include/config_process.php: updated build & version. + + * operation/search_agents.php: Fixed bug: icon to manage agent + + * operation/search_results.php: Fixed bug: search with blank spaces, + again another HTML entity problem :( + 2012-02-14 Hirofumi Kosaka * include/functions_api.php: Added get_all_alert_templates diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 14821a2a82..eb6f7ae1e6 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -22,8 +22,8 @@ /** * Pandora build version and version */ -$build_version = 'PC120202'; -$pandora_version = 'v4.0.1'; +$build_version = 'PC120214'; +$pandora_version = 'v5.0-dev'; date_default_timezone_set("Europe/Berlin"); diff --git a/pandora_console/operation/search_agents.php b/pandora_console/operation/search_agents.php index 1398018be1..5a7068b126 100755 --- a/pandora_console/operation/search_agents.php +++ b/pandora_console/operation/search_agents.php @@ -2,7 +2,7 @@ // Pandora FMS - http://pandorafms.com // ================================================== -// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas +// Copyright (c) 2005-2012 Artica Soluciones Tecnologicas // Please see http://pandorafms.org for full contribution list // This program is free software; you can redistribute it and/or @@ -277,6 +277,7 @@ else { $time_style = ''.$time.''; $manage_agent = ''; + if (check_acl ($config['id_user'], $agent['id_grupo'], "AW")) { $manage_agent = '' . html_print_image("images/setup.png", true, array("title" => __('Manage'), "alt" => __('Manage'))) . ''; diff --git a/pandora_console/operation/search_results.php b/pandora_console/operation/search_results.php index cb1623cccc..27d53df7b6 100644 --- a/pandora_console/operation/search_results.php +++ b/pandora_console/operation/search_results.php @@ -24,11 +24,13 @@ $searchAgents = $searchAlerts = $searchModules = check_acl($config['id_user'], 0 $searchUsers = check_acl($config['id_user'], 0, "UM"); $searchMaps = $searchReports = $searchGraphs = check_acl($config["id_user"], 0, "IR"); -$arrayKeywords = explode(' ', $config['search_keywords']); +$arrayKeywords = explode(' ', $config['search_keywords']); $temp = array(); -foreach ($arrayKeywords as $keyword) - array_push($temp, "%" . io_safe_input($keyword) . "%"); -$stringSearchSQL = implode(" ",$temp); +foreach ($arrayKeywords as $keyword){ + // Remember, $keyword is already pass a safeinput filter. + array_push($temp, "%" . $keyword . "%"); +} +$stringSearchSQL = implode(" ",$temp); if ($config['search_category'] == "all") $searchTab = "agents";