mirror of
https://github.com/wallabag/wallabag.git
synced 2025-10-15 19:42:08 +00:00
Cleanup
This commit is contained in:
parent
af6363bbbd
commit
b7dba18cb2
41 changed files with 285 additions and 950 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue