format
This commit is contained in:
parent
3a9fd38cb0
commit
df797745e6
@ -28,7 +28,8 @@ class AutoComplete extends Extension
|
|||||||
$this->theme->build_autocomplete($page);
|
$this->theme->build_autocomplete($page);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function complete(string $search, int $limit): array {
|
private function complete(string $search, int $limit): array
|
||||||
|
{
|
||||||
global $cache, $database;
|
global $cache, $database;
|
||||||
|
|
||||||
if (!$search) {
|
if (!$search) {
|
||||||
@ -58,7 +59,8 @@ class AutoComplete extends Extension
|
|||||||
|
|
||||||
$res = $cache->get($cache_key);
|
$res = $cache->get($cache_key);
|
||||||
if (!$res) {
|
if (!$res) {
|
||||||
$res = $database->get_pairs("
|
$res = $database->get_pairs(
|
||||||
|
"
|
||||||
SELECT tag, count
|
SELECT tag, count
|
||||||
FROM tags
|
FROM tags
|
||||||
WHERE LOWER(tag) LIKE LOWER(:search)
|
WHERE LOWER(tag) LIKE LOWER(:search)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user