From ff7328e8deffd5a4dae1e7c0a1836ee903e2307f Mon Sep 17 00:00:00 2001 From: mensonge Date: Wed, 10 Dec 2008 10:09:01 +0000 Subject: [PATCH] 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 --- services/tag2tagservice.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }