From 3dd24c5b5d1663142898bca886e46cda82db73fd Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 31 Aug 2010 08:15:57 +0000 Subject: [PATCH] 2010-08-31 Sergio Martin * operation/search_reports.php: Added the description field to the reports search in the main menu git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3197 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/operation/search_reports.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5f6cee88ac..9da5c9b367 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-08-31 Sergio Martin + + * operation/search_reports.php: Added the description + field to the reports search in the main menu + 2010-08-31 Sergio Martin * operation/search_maps.php: Fixed the group icon diff --git a/pandora_console/operation/search_reports.php b/pandora_console/operation/search_reports.php index 322b032cdb..d722e5d3a1 100755 --- a/pandora_console/operation/search_reports.php +++ b/pandora_console/operation/search_reports.php @@ -42,11 +42,11 @@ if(!$userreports_id){ $reports = false; if($searchReports) { - $sql = "SELECT id_report, name, description FROM treport WHERE name LIKE '%" . $stringSearchSQL . "%'".$reports_condition. + $sql = "SELECT id_report, name, description FROM treport WHERE (name LIKE '%" . $stringSearchSQL . "%' OR description LIKE '%" . $stringSearchSQL . "%')".$reports_condition. " LIMIT " . $config['block_size'] . " OFFSET " . get_parameter ('offset',0); $reports = process_sql($sql); - $sql = "SELECT COUNT(id_report) AS count FROM treport WHERE name LIKE '%" . $stringSearchSQL . "%'"; + $sql = "SELECT COUNT(id_report) AS count FROM treport WHERE (name LIKE '%" . $stringSearchSQL . "%' OR description LIKE '%" . $stringSearchSQL . "%')"; $totalReports = get_db_row_sql($sql); $totalReports = $totalReports['count']; }