Skip to content

Commit

Permalink
re #12: Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ercanozkaya committed Jul 13, 2016
1 parent 2820a61 commit 0306596
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions controller/behavior/taggable.php
Expand Up @@ -58,8 +58,9 @@ protected function _setTags(KControllerContextInterface $context)
$this->_removeTags($entity);
} else if ($operation === 'append') {
$this->_appendTags($entity);
} else {
$this->_replaceTags($entity);
}
else $this->_replaceTags($entity);
}
}
}
Expand Down Expand Up @@ -104,7 +105,7 @@ protected function _appendTags(KModelEntityInterface $entity)
foreach ($tags as $tag) {
$existing[] = $tag->title;
}

//Create tags
if($entity->tags)
{
Expand Down Expand Up @@ -138,7 +139,8 @@ protected function _removeTags(KModelEntityInterface $entity)
{
$tags = $entity->getTags();

foreach ($tags as $tag) {
foreach ($tags as $tag)
{
if (in_array($tag->title, $entity->tags)) {
$tag->delete();
}
Expand Down

0 comments on commit 0306596

Please sign in to comment.