From 0bfd4e4d3f4fa3db0b2de50277b0cfbddcf6efdf Mon Sep 17 00:00:00 2001 From: mensonge Date: Fri, 11 Jan 2008 09:34:32 +0000 Subject: Interface design: structured tags on frontpage and tag pages + permission control added to add and delete tag links git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@10 b3834d28-1941-0410-a4f8-b48e95affb8f --- services/tag2tagservice.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'services') diff --git a/services/tag2tagservice.php b/services/tag2tagservice.php index 0b53d64..d522039 100644 --- a/services/tag2tagservice.php +++ b/services/tag2tagservice.php @@ -88,14 +88,18 @@ class Tag2TagService { return $output; } - function getOrphewTags($relationType, $uId) { + function getOrphewTags($relationType, $uId = 0) { $query = "SELECT DISTINCT tag1 as tag FROM `". $this->getTableName() ."`"; $query.= " WHERE tag1 <> ALL"; $query.= " (SELECT DISTINCT tag2 FROM `". $this->getTableName() ."`"; $query.= " WHERE relationType = '".$relationType."'"; - $query.= " AND uId = '".$uId."'"; + if($uId > 0) { + $query.= " AND uId = '".$uId."'"; + } $query.= ")"; - $query.= " AND uId = '".$uId."'"; + if($uId > 0) { + $query.= " AND uId = '".$uId."'"; + } //die($query); -- cgit v1.2.3