summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2011-11-26 22:27:47 -0800
committerArun Persaud <apersaud@lbl.gov>2011-11-26 22:27:47 -0800
commitc1e08c52aa47aa1db8a548c5c4b9c61f62335402 (patch)
tree3202ea5e4f3418cad0b3e701b889dff427546501
parent629e06724cde4ecd8d1e30fa04567cc1960410c5 (diff)
downloadphoto-tags-c1e08c52aa47aa1db8a548c5c4b9c61f62335402.tar.gz
photo-tags-c1e08c52aa47aa1db8a548c5c4b9c61f62335402.tar.bz2
photo-tags-c1e08c52aa47aa1db8a548c5c4b9c61f62335402.zip
fix automatic tag completion
-rw-r--r--getjson.php4
-rw-r--r--index.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/getjson.php b/getjson.php
index 0288646..14af09b 100644
--- a/getjson.php
+++ b/getjson.php
@@ -20,8 +20,8 @@ if (isset($_REQUEST["S"]))
{
/* single tag or part of tag */
$tag = sqlite_escape_string($_REQUEST["S"]);
- /* individual tags are separated by '+' */
- $result = $DB->query("SELECT name FROM tags where name like \"%$tag%\"");
+
+ $result = $DB->query("SELECT name FROM tags");
$count = $DB->query("SELECT 1");
}
else
diff --git a/index.php b/index.php
index a6112ab..e5131db 100644
--- a/index.php
+++ b/index.php
@@ -64,7 +64,7 @@ var count=0;
/* populate data list with tags*/
d3.json("<?php echo $webbase?>/getjson.php?S", function(json) {
- d3.select("#MyTags").selectAll("option").data(json)
+ d3.select("#MyTags").selectAll("option").data(json[1])
.enter().append("option").attr("value",function(d) {return d.name});
});