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
This commit is contained in:
mensonge 2008-12-10 10:09:01 +00:00
parent 37c58e490f
commit ff7328e8de

View File

@ -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;
}