CS
This commit is contained in:
parent
1cc149fbd6
commit
5c8833d5f5
1 changed files with 15 additions and 7 deletions
|
@ -308,8 +308,11 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_DbService
|
||||||
/*
|
/*
|
||||||
* Return values associated with a key.
|
* Return values associated with a key.
|
||||||
* $tagExcepted allows to hide a value.
|
* $tagExcepted allows to hide a value.
|
||||||
|
*
|
||||||
|
* @return array Array with tag names
|
||||||
*/
|
*/
|
||||||
function _getSynonymValues($tag1, $uId, $tagExcepted = NULL) {
|
protected function _getSynonymValues($tag1, $uId, $tagExcepted = NULL)
|
||||||
|
{
|
||||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||||
$tag1 = $tagservice->normalize($tag1);
|
$tag1 = $tagservice->normalize($tag1);
|
||||||
$tagExcepted = $tagservice->normalize($tagExcepted);
|
$tagExcepted = $tagservice->normalize($tagExcepted);
|
||||||
|
@ -321,10 +324,15 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_DbService
|
||||||
$query .= " WHERE relationType = '='";
|
$query .= " WHERE relationType = '='";
|
||||||
$query .= " AND tag1 = '" . $this->db->sql_escape($tag1) . "'";
|
$query .= " AND tag1 = '" . $this->db->sql_escape($tag1) . "'";
|
||||||
$query .= " AND uId = " . intval($uId);
|
$query .= " AND uId = " . intval($uId);
|
||||||
$query.= $tagExcepted!=''?" AND tag2!='" . $this->db->sql_escape($tagExcepted) . "'" : '';
|
$query .= $tagExcepted != ''
|
||||||
|
? " AND tag2!='" . $this->db->sql_escape($tagExcepted) . "'"
|
||||||
|
: '';
|
||||||
|
|
||||||
if (! ($dbresult = $this->db->sql_query($query)) ){
|
if (! ($dbresult = $this->db->sql_query($query)) ){
|
||||||
message_die(GENERAL_ERROR, 'Could not get related tags', '', __LINE__, __FILE__, $query, $this->db);
|
message_die(
|
||||||
|
GENERAL_ERROR, 'Could not get related tags',
|
||||||
|
'', __LINE__, __FILE__, $query, $this->db
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue