diff options
author | Andrew Dolgov <[email protected]> | 2007-08-10 08:35:55 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-08-10 08:35:55 +0100 |
commit | 05fcdf52b292b7da75b6b12156dbc4ba678349e3 (patch) | |
tree | 6f07450f372b7b90834de7d7623bbf3db7637105 /modules/backend-rpc.php | |
parent | d84f95234a1825fadc25e35c78492bf7b9838393 (diff) |
tag editor: autocomplete
Diffstat (limited to 'modules/backend-rpc.php')
-rw-r--r-- | modules/backend-rpc.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 7e83e816a..3303b25f9 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -320,5 +320,22 @@ print_error_xml(6); } + if ($subop == "completeTags") { + + $search = db_escape_string($_REQUEST["search"]); + + $result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags + WHERE owner_uid = '".$_SESSION["uid"]."' AND + tag_name LIKE '$search%' ORDER BY tag_name + LIMIT 10"); + + print "<ul>"; + while ($line = db_fetch_assoc($result)) { + print "<li>" . $line["tag_name"] . "</li>"; + } + print "</ul>"; + + } + } ?> |