2014-03-05 Miguel de Dios <miguel.dedios@artica.es>

* index.php, operation/search_results.php: fixed the global search
	when the text to search end with whitespace.
	
	Incident: #605




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9510 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-03-05 15:29:57 +00:00
parent 97ff2c0e46
commit 4acd8e9b95
3 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2014-03-05 Miguel de Dios <miguel.dedios@artica.es>
* index.php, operation/search_results.php: fixed the global search
when the text to search end with whitespace.
Incident: #605
2014-03-05 Miguel de Dios <miguel.dedios@artica.es>
* include/ajax/module.php: fixed the ajax calls for to get json

View File

@ -158,7 +158,7 @@ if ($change_pass == 1) {
$searchPage = false;
$search = get_parameter_get("head_search_keywords");
if (strlen($search) > 0) {
$config['search_keywords'] = trim(get_parameter('keywords'));
$config['search_keywords'] = io_safe_input(trim(io_safe_output(get_parameter('keywords'))));
// If not search category providad, we'll use an agent search
$config['search_category'] = get_parameter('search_category', 'all');
if (($config['search_keywords'] != 'Enter keywords to search') && (strlen($config['search_keywords']) > 0))

View File

@ -26,8 +26,9 @@ $searchMaps = $searchReports = $searchGraphs = check_acl($config["id_user"], 0,
$searchMain = true;
$arrayKeywords = explode('&#x20;', $config['search_keywords']);
$temp = array();
foreach ($arrayKeywords as $keyword){
foreach ($arrayKeywords as $keyword) {
// Remember, $keyword is already pass a safeinput filter.
array_push($temp, "%" . $keyword . "%");
}