aboutsummaryrefslogtreecommitdiff
path: root/www/ajax
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2011-08-07 16:53:17 +0200
committerChristian Weiske <cweiske@cweiske.de>2011-08-07 16:53:17 +0200
commitdd29ad13eb1c3dd11fa67c533f7538fb0932218b (patch)
treefa3633bcd8cf49318dc465f952e25013153bb3d4 /www/ajax
parent889ca453ecbfe96365cc9cab72f4ac345e781fa4 (diff)
downloadsemanticscuttle-dd29ad13eb1c3dd11fa67c533f7538fb0932218b.tar.gz
semanticscuttle-dd29ad13eb1c3dd11fa67c533f7538fb0932218b.tar.bz2
Fix bug #3382126: Linked tags does not work for tags with spaces
Diffstat (limited to 'www/ajax')
-rw-r--r--www/ajax/getlinkedtags.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/www/ajax/getlinkedtags.php b/www/ajax/getlinkedtags.php
index d8ddb5b..9bb3b1f 100644
--- a/www/ajax/getlinkedtags.php
+++ b/www/ajax/getlinkedtags.php
@@ -1,13 +1,12 @@
<?php
/**
- * Returns a list of tags linked to the given one,
+ * Returns a list of tags linked to the given one(s),
* suitable for jsTree consumption.
*
* Accepted GET parameters:
*
* @param string $tag Tag for which the children tags shall be returned
- * Multiple tags (separated with space or "+") are
- * supported.
+ * Multiple tags (separated with comma) are supported.
* If no tag is given, all top-level tags are loaded.
* @param integer $uId User ID to fetch the tags for
* @param boolean $parent Load parent tags
@@ -32,7 +31,7 @@ $tag = isset($_GET['tag']) ? $_GET['tag'] : null;
$uId = isset($_GET['uId']) ? (int)$_GET['uId'] : 0;
$loadParentTags = isset($_GET['parent']) ? (bool)$_GET['parent'] : false;
-$tags = explode(' ', trim($tag));
+$tags = explode(',', trim($tag));
if (count($tags) == 1 && $tags[0] == '') {
//no tags
$tags = array();