summaryrefslogtreecommitdiffstatshomepage
path: root/services/tag2tagservice.php
diff options
context:
space:
mode:
Diffstat (limited to 'services/tag2tagservice.php')
-rw-r--r--services/tag2tagservice.php10
1 files changed, 7 insertions, 3 deletions
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);