Skip to content

Commit

Permalink
Merge branch 'master' of github.com:forkcms/forkcms
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasmullie committed Mar 5, 2012
2 parents 874f69b + 937f93b commit d6a8a86
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions backend/modules/tags/engine/model.php
Expand Up @@ -255,9 +255,15 @@ public static function saveTags($otherId, $tags, $module, $language = null)
);

// remove old links
if(!empty($currentTags)) $db->delete('modules_tags', 'tag_id IN (' . implode(', ', array_values($currentTags)) . ') AND other_id = ?', $otherId);
if(!empty($currentTags))
{
$db->delete(
'modules_tags',
'tag_id IN (' . implode(', ', array_values($currentTags)) . ') AND other_id = ? AND module = ?',
array($otherId, $module)
);
}

// tags provided
if(!empty($tags))
{
// loop tags
Expand Down

0 comments on commit d6a8a86

Please sign in to comment.