diff options
author | Olivier Mehani <shtrom@ssji.net> | 2019-05-10 22:07:55 +1000 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-24 15:17:46 +0200 |
commit | 4a5516376bf4c8b0cdc1e81d24ce1cca68425785 (patch) | |
tree | ccf3ced45a2841c5fdfe9010b40528bb365c32b2 /src/Wallabag/CoreBundle/Entity | |
parent | d5744bf0dfdbee4dbbe380d8a076d07b89fc76e6 (diff) | |
download | wallabag-4a5516376bf4c8b0cdc1e81d24ce1cca68425785.tar.gz wallabag-4a5516376bf4c8b0cdc1e81d24ce1cca68425785.tar.zst wallabag-4a5516376bf4c8b0cdc1e81d24ce1cca68425785.zip |
Add Wallabag\CoreBundle\Helper\UrlHasher
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity')
-rw-r--r-- | src/Wallabag/CoreBundle/Entity/Entry.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index c3fb87d2..1b4367fd 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -13,6 +13,7 @@ use JMS\Serializer\Annotation\XmlRoot; | |||
13 | use Symfony\Component\Validator\Constraints as Assert; | 13 | use Symfony\Component\Validator\Constraints as Assert; |
14 | use Wallabag\AnnotationBundle\Entity\Annotation; | 14 | use Wallabag\AnnotationBundle\Entity\Annotation; |
15 | use Wallabag\CoreBundle\Helper\EntityTimestampsTrait; | 15 | use Wallabag\CoreBundle\Helper\EntityTimestampsTrait; |
16 | use Wallabag\CoreBundle\Helper\UrlHasher; | ||
16 | use Wallabag\UserBundle\Entity\User; | 17 | use Wallabag\UserBundle\Entity\User; |
17 | 18 | ||
18 | /** | 19 | /** |
@@ -324,7 +325,7 @@ class Entry | |||
324 | public function setUrl($url) | 325 | public function setUrl($url) |
325 | { | 326 | { |
326 | $this->url = $url; | 327 | $this->url = $url; |
327 | $this->hashedUrl = hash('sha1', $url); | 328 | $this->hashedUrl = UrlHasher::hashUrl($url); |
328 | 329 | ||
329 | return $this; | 330 | return $this; |
330 | } | 331 | } |