diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index a04f101f..faf4d259 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -26,7 +26,7 @@ use Wallabag\UserBundle\Entity\User; | |||
26 | * indexes={ | 26 | * indexes={ |
27 | * @ORM\Index(name="created_at", columns={"created_at"}), | 27 | * @ORM\Index(name="created_at", columns={"created_at"}), |
28 | * @ORM\Index(name="uid", columns={"uid"}), | 28 | * @ORM\Index(name="uid", columns={"uid"}), |
29 | * @ORM\Index(name="hashed_url", columns={"hashed_url"}) | 29 | * @ORM\Index(name="hashed_url_user_id", columns={"user_id", "hashed_url"}) |
30 | * } | 30 | * } |
31 | * ) | 31 | * ) |
32 | * @ORM\HasLifecycleCallbacks() | 32 | * @ORM\HasLifecycleCallbacks() |
@@ -79,7 +79,7 @@ class Entry | |||
79 | /** | 79 | /** |
80 | * @var string | 80 | * @var string |
81 | * | 81 | * |
82 | * @ORM\Column(name="hashed_url", type="string", length=32, nullable=true) | 82 | * @ORM\Column(name="hashed_url", type="string", length=40, nullable=true) |
83 | */ | 83 | */ |
84 | private $hashedUrl; | 84 | private $hashedUrl; |
85 | 85 | ||
@@ -324,6 +324,7 @@ class Entry | |||
324 | public function setUrl($url) | 324 | public function setUrl($url) |
325 | { | 325 | { |
326 | $this->url = $url; | 326 | $this->url = $url; |
327 | $this->hashedUrl = hash('sha1', $url); | ||
327 | 328 | ||
328 | return $this; | 329 | return $this; |
329 | } | 330 | } |