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:
parent
37c58e490f
commit
ff7328e8de
1 changed files with 2 additions and 1 deletions
|
@ -18,10 +18,11 @@ class Tag2TagService {
|
||||||
function addLinkedTags($tag1, $tag2, $relationType, $uId) {
|
function addLinkedTags($tag1, $tag2, $relationType, $uId) {
|
||||||
$tagservice =& ServiceFactory::getServiceInstance('TagService');
|
$tagservice =& ServiceFactory::getServiceInstance('TagService');
|
||||||
$tag1 = $tagservice->normalize($tag1);
|
$tag1 = $tagservice->normalize($tag1);
|
||||||
$tag2 = $tagservice->normalize($tag2);
|
$tag2 = $tagservice->normalize($tag2);
|
||||||
|
|
||||||
if($tag1 == $tag2 || strlen($tag1) == 0 || strlen($tag2) == 0
|
if($tag1 == $tag2 || strlen($tag1) == 0 || strlen($tag2) == 0
|
||||||
|| ($relationType != ">" && $relationType != "=")
|
|| ($relationType != ">" && $relationType != "=")
|
||||||
|
|| !is_numeric($uId) || $uId<=0
|
||||||
|| ($this->existsLinkedTags($tag1, $tag2, $relationType, $uId))) {
|
|| ($this->existsLinkedTags($tag1, $tag2, $relationType, $uId))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue