fix case-insensitive autocomplete on postgres
This commit is contained in:
parent
5d5b1d7059
commit
b5d56214cd
@ -22,16 +22,15 @@ class AutoComplete extends Extension {
|
|||||||
$cache_key .= "-" . $_GET["limit"];
|
$cache_key .= "-" . $_GET["limit"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = null;
|
|
||||||
$res = $database->cache->get($cache_key);
|
$res = $database->cache->get($cache_key);
|
||||||
if(!$res) {
|
if(!$res) {
|
||||||
$res = $database->get_pairs("
|
$res = $database->get_pairs($database->scoreql_to_sql("
|
||||||
SELECT tag, count
|
SELECT tag, count
|
||||||
FROM tags
|
FROM tags
|
||||||
WHERE tag LIKE :search
|
WHERE SCORE_STRNORM(tag) LIKE SCORE_STRNORM(:search)
|
||||||
AND count > 0
|
AND count > 0
|
||||||
ORDER BY count DESC
|
ORDER BY count DESC
|
||||||
$limitSQL", $SQLarr
|
$limitSQL"), $SQLarr
|
||||||
);
|
);
|
||||||
$database->cache->set($cache_key, $res, 600);
|
$database->cache->set($cache_key, $res, 600);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user