Commit bd78ee53 authored by Ruslan Kabalin's avatar Ruslan Kabalin
Browse files

Fix letters case issues in self_search (bug #932709)



Change-Id: I35560af2e55114db92a7651a4df76e1713bb8254
Signed-off-by: default avatarRuslan Kabalin <ruslan.kabalin@luns.net.uk>
parent 96b4a072
......@@ -794,7 +794,7 @@ class PluginSearchInternal extends PluginSearch {
(LOWER(at.tag) = ?)
)";
array_unshift($querydata[1], $USER->get('id'));
array_push($querydata[1], $querystring);
array_push($querydata[1], strtolower($querystring));
$results = array(
'data' => get_records_sql_array($sql, $querydata[1], $offset, $limit),
......@@ -1057,7 +1057,7 @@ class PluginSearchInternal extends PluginSearch {
}
}
// Return matching snippet and number of added words
return array("a.title ". ($not ? 'NOT ' : '') ."LIKE '%' || ? || '%'" . ($not ? ' AND ' : ' OR ') . 'a.description ' . ($not ? 'NOT ' : '') . "LIKE '%' || ? || '%'", $count);
return array("a.title ". ($not ? 'NOT ' : '') . db_ilike() . " '%' || ? || '%'" . ($not ? ' AND ' : ' OR ') . 'a.description ' . ($not ? 'NOT ' : '') . db_ilike() . " '%' || ? || '%'", $count);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment