aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Command
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2019-04-01 13:51:57 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-04-01 13:51:57 +0200
commit8a6456629814039cfc623cdb279bcba06dacff50 (patch)
treeb3ae2459651b6ad085588fca0c624c6df554deb3 /src/Wallabag/CoreBundle/Command
parent9c2b2aae70b06411336e6eb6ac43b3ebd30dc38c (diff)
downloadwallabag-8a6456629814039cfc623cdb279bcba06dacff50.tar.gz
wallabag-8a6456629814039cfc623cdb279bcba06dacff50.tar.zst
wallabag-8a6456629814039cfc623cdb279bcba06dacff50.zip
Use a better index for hashed_url
It'll most often be used in addition to the `user_id`. Also, automatically generate the hash when saving the url. Switch from `md5` to `sha1`.
Diffstat (limited to 'src/Wallabag/CoreBundle/Command')
-rw-r--r--src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php
index fb598390..685e1672 100644
--- a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php
+++ b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php
@@ -69,7 +69,7 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand
69 69
70 $i = 1; 70 $i = 1;
71 foreach ($entries as $entry) { 71 foreach ($entries as $entry) {
72 $entry->setHashedUrl(hash('md5', $entry->getUrl())); 72 $entry->setHashedUrl(hash('sha1', $entry->getUrl()));
73 $em->persist($entry); 73 $em->persist($entry);
74 74
75 if (0 === ($i % 20)) { 75 if (0 === ($i % 20)) {