aboutsummaryrefslogtreecommitdiff
path: root/services/bookmarkservice.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-01-25 07:24:38 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-01-25 07:24:38 +0000
commite740849d4c37dca5634e0ac39ffb6dfdb2aedf1e (patch)
tree959c130f4d200d456c73cd9e903e00a2ac1160cd /services/bookmarkservice.php
parent194ba8fbee8b4c131cecbb341d3b6bffbcb37627 (diff)
downloadsemanticscuttle-e740849d4c37dca5634e0ac39ffb6dfdb2aedf1e.tar.gz
semanticscuttle-e740849d4c37dca5634e0ac39ffb6dfdb2aedf1e.tar.bz2
New feature: structured tags, add synonym links (in backend)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@28 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services/bookmarkservice.php')
-rw-r--r--services/bookmarkservice.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/services/bookmarkservice.php b/services/bookmarkservice.php
index 93dd06a..68f3821 100644
--- a/services/bookmarkservice.php
+++ b/services/bookmarkservice.php
@@ -311,16 +311,13 @@ class BookmarkService {
$query_4 .= ' AND (';
$allLinkedTags = $tag2tagservice->getAllLinkedTags($this->db->sql_escape($tags[$i]), '>', $user);
- while (count($allLinkedTags)>1) {
+
+ while (is_array($allLinkedTags) && count($allLinkedTags)>0) {
$query_4 .= ' T'. $i .'.tag = "'. array_pop($allLinkedTags) .'"';
$query_4 .= ' OR';
}
- if(is_array($allLinkedTags)) {
- $query_4 .= ' T'. $i .'.tag = "'. array_pop($allLinkedTags) .'"';
- } else {
- $query_4 .= ' T'. $i .'.tag = "'. $allLinkedTags .'"';
- }
-
+
+ $query_4 .= ' T'. $i .'.tag = "'. $this->db->sql_escape($tags[$i]) .'"';
$query_4 .= ') AND T'. $i .'.bId = B.bId';
//die($query_4);