summaryrefslogtreecommitdiffstats
path: root/getjson.php
diff options
context:
space:
mode:
Diffstat (limited to 'getjson.php')
-rw-r--r--getjson.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/getjson.php b/getjson.php
index 007ef7c..97f8c49 100644
--- a/getjson.php
+++ b/getjson.php
@@ -34,11 +34,13 @@ else
if (isset($_REQUEST["T"]))
{
/* single tag or part of tag */
- $tags = sqlite_escape_string($_REQUEST["T"]);
- $tags = explode("+",$tags);
+ $tags = $_REQUEST["T"];
+ $tags = explode(",",$tags);
+ foreach ($tags as $key => $value)
+ $tags[$key]=sqlite_escape_string(trim($value));
$tags = "'".implode("','",$tags)."'";
- /* individual tags are seperated by '+' */
+ /* individual tags are seperated by ',' */
$result = $DB->query("SELECT base_uri, filename FROM photos ".
" left join photo_tags on photos.id=photo_tags.photo_id ".
" left join tags on tags.id=photo_tags.tag_id ".