diff options
author | Kévin Gomez <contact@kevingomez.fr> | 2015-10-24 15:11:06 +0200 |
---|---|---|
committer | Kévin Gomez <contact@kevingomez.fr> | 2015-11-11 16:27:19 +0100 |
commit | 625acf335298186b4ff983f9321900d1238e854b (patch) | |
tree | bc3149d9cee320429475ced6a1cb8b53c71ad7eb /src/Wallabag/CoreBundle/Entity | |
parent | cad8cda7af06234a63b86253da1d813e7b0fd0f2 (diff) | |
download | wallabag-625acf335298186b4ff983f9321900d1238e854b.tar.gz wallabag-625acf335298186b4ff983f9321900d1238e854b.tar.zst wallabag-625acf335298186b4ff983f9321900d1238e854b.zip |
Add a command to automatically tag all entries for a user
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity')
-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 | } |