diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-12-06 14:31:26 +0100 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2015-12-06 14:31:26 +0100 |
commit | a7f1921f7db312b5def3839393357f443dcbb52c (patch) | |
tree | 0522e03891433e9fdc9eb64d52b2d9651aadf1f7 /src/Wallabag/CoreBundle/Entity/Entry.php | |
parent | 2e15e30bf0e634bbbc3a9678904953d015490ed2 (diff) | |
parent | 752b90d1f2e279d3662d5431b09c7587df2937ca (diff) | |
download | wallabag-a7f1921f7db312b5def3839393357f443dcbb52c.tar.gz wallabag-a7f1921f7db312b5def3839393357f443dcbb52c.tar.zst wallabag-a7f1921f7db312b5def3839393357f443dcbb52c.zip |
Merge pull request #1478 from K-Phoen/rule-based-tags
Rule based tags
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 5aa582f8..608ed2f0 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -458,6 +458,10 @@ class Entry | |||
458 | */ | 458 | */ |
459 | public function addTag(Tag $tag) | 459 | public function addTag(Tag $tag) |
460 | { | 460 | { |
461 | if ($this->tags->contains($tag)) { | ||
462 | return; | ||
463 | } | ||
464 | |||
461 | $this->tags[] = $tag; | 465 | $this->tags[] = $tag; |
462 | $tag->addEntry($this); | 466 | $tag->addEntry($this); |
463 | } | 467 | } |