aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-05-24 15:15:12 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-05-24 15:17:46 +0200
commit0132ccd2a2e73a831fa198940c369bcdd5249e8b (patch)
tree1628ff3cecb2054d7abe21765af6ccda967d274d /src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php
parent4a5516376bf4c8b0cdc1e81d24ce1cca68425785 (diff)
downloadwallabag-0132ccd2a2e73a831fa198940c369bcdd5249e8b.tar.gz
wallabag-0132ccd2a2e73a831fa198940c369bcdd5249e8b.tar.zst
wallabag-0132ccd2a2e73a831fa198940c369bcdd5249e8b.zip
Change the way to define algorithm for hashing url
Diffstat (limited to 'src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php')
-rw-r--r--src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php
index 775b0413..8f2bff11 100644
--- a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php
+++ b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php
@@ -66,9 +66,7 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand
66 66
67 $i = 1; 67 $i = 1;
68 foreach ($entries as $entry) { 68 foreach ($entries as $entry) {
69 $entry->setHashedUrl( 69 $entry->setHashedUrl(UrlHasher::hashUrl($entry->getUrl()));
70 UrlHasher::hashUrl($entry->getUrl())
71 );
72 $em->persist($entry); 70 $em->persist($entry);
73 71
74 if (0 === ($i % 20)) { 72 if (0 === ($i % 20)) {
@@ -87,7 +85,7 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand
87 * 85 *
88 * @param string $username 86 * @param string $username
89 * 87 *
90 * @return \Wallabag\UserBundle\Entity\User 88 * @return User
91 */ 89 */
92 private function getUser($username) 90 private function getUser($username)
93 { 91 {