From af5c64045b436357006500afb448b266d927e65a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 6 Apr 2023 15:51:09 +0300 Subject: add simple autocompleter for tags --- classes/article.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'classes') diff --git a/classes/article.php b/classes/article.php index 609ddeebe..5bddf3bdb 100755 --- a/classes/article.php +++ b/classes/article.php @@ -239,8 +239,7 @@ class Article extends Handler_Protected { print json_encode(["id" => (int)$id, "tags" => $this->_get_tags($id)]); } - - /*function completeTags() { + function completeTags() { $search = clean($_REQUEST["search"]); $sth = $this->pdo->prepare("SELECT DISTINCT tag_name FROM ttrss_tags @@ -250,12 +249,14 @@ class Article extends Handler_Protected { $sth->execute([$_SESSION['uid'], "$search%"]); - print ""; - }*/ + + print json_encode($results); + } function assigntolabel(): void { $this->_label_ops(true); -- cgit v1.2.3