forked from wallabag/wallabag
Cleanup
This commit is contained in:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user