diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Command')
-rw-r--r-- | src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php index 45bd8c5f..775b0413 100644 --- a/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php +++ b/src/Wallabag/CoreBundle/Command/GenerateUrlHashesCommand.php | |||
@@ -7,6 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |||
7 | use Symfony\Component\Console\Input\InputArgument; | 7 | use Symfony\Component\Console\Input\InputArgument; |
8 | use Symfony\Component\Console\Input\InputInterface; | 8 | use Symfony\Component\Console\Input\InputInterface; |
9 | use Symfony\Component\Console\Output\OutputInterface; | 9 | use Symfony\Component\Console\Output\OutputInterface; |
10 | use Wallabag\CoreBundle\Helper\UrlHasher; | ||
10 | use Wallabag\UserBundle\Entity\User; | 11 | use Wallabag\UserBundle\Entity\User; |
11 | 12 | ||
12 | class GenerateUrlHashesCommand extends ContainerAwareCommand | 13 | class GenerateUrlHashesCommand extends ContainerAwareCommand |
@@ -65,7 +66,9 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand | |||
65 | 66 | ||
66 | $i = 1; | 67 | $i = 1; |
67 | foreach ($entries as $entry) { | 68 | foreach ($entries as $entry) { |
68 | $entry->setHashedUrl(hash('sha1', $entry->getUrl())); | 69 | $entry->setHashedUrl( |
70 | UrlHasher::hashUrl($entry->getUrl()) | ||
71 | ); | ||
69 | $em->persist($entry); | 72 | $em->persist($entry); |
70 | 73 | ||
71 | if (0 === ($i % 20)) { | 74 | if (0 === ($i % 20)) { |