diff --git a/api/tags_autocomplete.php b/api/tags_autocomplete.php new file mode 100644 index 0000000..cc32c31 --- /dev/null +++ b/api/tags_autocomplete.php @@ -0,0 +1,18 @@ + true, 'message' => 'No tag name provided'])); +} + +$tag_name = Tag::cleanTagName($_GET['tag']); +$tag_name = str_replace('%', '', $tag_name); /* get rid of MySQL LIKE wildcards */ + +$results = $conn->query('SELECT name FROM tags WHERE name LIKE ?', [$tag_name . '%']); + +echo json_encode($results->fetchAll()); diff --git a/theme/bulma/main.php b/theme/bulma/main.php index f288ae4..e0030c6 100644 --- a/theme/bulma/main.php +++ b/theme/bulma/main.php @@ -25,15 +25,25 @@ });
@@ -237,19 +247,15 @@
- -
">
- -
@@ -420,12 +426,7 @@ - - - -
-