fix case-insensitive autocomplete on postgres

This commit is contained in:
Daku 2016-06-18 14:45:21 +01:00
parent 5d5b1d7059
commit b5d56214cd

View file

@ -22,16 +22,15 @@ class AutoComplete extends Extension {
$cache_key .= "-" . $_GET["limit"];
}
$res = null;
$res = $database->cache->get($cache_key);
if(!$res) {
$res = $database->get_pairs("
$res = $database->get_pairs($database->scoreql_to_sql("
SELECT tag, count
FROM tags
WHERE tag LIKE :search
WHERE SCORE_STRNORM(tag) LIKE SCORE_STRNORM(:search)
AND count > 0
ORDER BY count DESC
$limitSQL", $SQLarr
$limitSQL"), $SQLarr
);
$database->cache->set($cache_key, $res, 600);
}