1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-10-15 19:42:08 +00:00
This commit is contained in:
Jeremy Benoist 2022-11-23 15:51:33 +01:00
parent af6363bbbd
commit b7dba18cb2
No known key found for this signature in database
GPG key ID: 7168D5DD29F38552
41 changed files with 285 additions and 950 deletions

View file

@ -43,7 +43,7 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand
return 1;
}
} else {
$users = $this->getDoctrine()->getRepository(User::class)->findAll();
$users = $this->getContainer()->get('doctrine')->getRepository(User::class)->findAll();
$output->writeln(sprintf('Generating hashed urls for "%d" users', \count($users)));
@ -60,7 +60,7 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand
private function generateHashedUrls(User $user)
{
$em = $this->getContainer()->get(EntityManagerInterface::class);
$repo = $this->getDoctrine()->getRepository(Entry::class);
$repo = $this->getContainer()->get('doctrine')->getRepository(Entry::class);
$entries = $repo->findByEmptyHashedUrlAndUserId($user->getId());
@ -89,7 +89,7 @@ class GenerateUrlHashesCommand extends ContainerAwareCommand
*/
private function getUser($username)
{
return $this->getDoctrine()->getRepository(User::class)->findOneByUserName($username);
return $this->getContainer()->get('doctrine')->getRepository(User::class)->findOneByUserName($username);
}
private function getDoctrine()