X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FEntry.php;h=bf8db5ab31b2c2468333dffa8629c853656f6590;hb=9b5edf33a00490b033692efca9987a35225835ba;hp=2813c94420c8a55d9523c18e5f2b0f3715f7cb4f;hpb=d25b8288216a09fa5cf7f40e614c133a6edd8a67;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 2813c944..bf8db5ab 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -4,10 +4,10 @@ namespace Wallabag\CoreBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; -use Symfony\Component\Validator\Constraints as Assert; use Hateoas\Configuration\Annotation as Hateoas; use JMS\Serializer\Annotation\Groups; use JMS\Serializer\Annotation\XmlRoot; +use Symfony\Component\Validator\Constraints as Assert; use Wallabag\UserBundle\Entity\User; /** @@ -168,7 +168,7 @@ class Entry private $user; /** - * @ORM\ManyToMany(targetEntity="Tag", inversedBy="entries", cascade={"persist"}) + * @ORM\ManyToMany(targetEntity="Tag", inversedBy="entries", cascade={"persist", "remove"}) * @ORM\JoinTable * * @Groups({"entries_for_user", "export_all"}) @@ -245,7 +245,7 @@ class Entry /** * Set isArchived. * - * @param string $isArchived + * @param bool $isArchived * * @return Entry */ @@ -259,7 +259,7 @@ class Entry /** * Get isArchived. * - * @return string + * @return bool */ public function isArchived() { @@ -276,7 +276,7 @@ class Entry /** * Set isStarred. * - * @param string $isStarred + * @param bool $isStarred * * @return Entry */ @@ -290,7 +290,7 @@ class Entry /** * Get isStarred. * - * @return string + * @return bool */ public function isStarred() { @@ -465,7 +465,7 @@ class Entry // check if tag already exist but has not yet be persisted // it seems that the previous condition with `contains()` doesn't check that case foreach ($this->tags as $existingTag) { - if ($existingTag->getUser() !== $tag->getUser() || $existingTag->getLabel() === $tag->getLabel()) { + if ($existingTag->getLabel() === $tag->getLabel()) { return; } }