summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-12-10 10:09:01 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-12-10 10:09:01 +0000
commitff7328e8deffd5a4dae1e7c0a1836ee903e2307f (patch)
tree837aff59c4a29c5729fe4d0ab8f43e127de56511
parent37c58e490f141b5fcc77531aeee163a6650d6bd8 (diff)
downloadsemanticscuttle-ff7328e8deffd5a4dae1e7c0a1836ee903e2307f.tar.gz
semanticscuttle-ff7328e8deffd5a4dae1e7c0a1836ee903e2307f.tar.bz2
bug fix: prevent creating linked tags without uId
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@202 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r--services/tag2tagservice.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/tag2tagservice.php b/services/tag2tagservice.php
index a2d7ac3..d19b097 100644
--- a/services/tag2tagservice.php
+++ b/services/tag2tagservice.php
@@ -18,10 +18,11 @@ class Tag2TagService {
function addLinkedTags($tag1, $tag2, $relationType, $uId) {
$tagservice =& ServiceFactory::getServiceInstance('TagService');
$tag1 = $tagservice->normalize($tag1);
- $tag2 = $tagservice->normalize($tag2);
+ $tag2 = $tagservice->normalize($tag2);
if($tag1 == $tag2 || strlen($tag1) == 0 || strlen($tag2) == 0
|| ($relationType != ">" && $relationType != "=")
+ || !is_numeric($uId) || $uId<=0
|| ($this->existsLinkedTags($tag1, $tag2, $relationType, $uId))) {
return false;
}