X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FCleanDuplicatesCommand.php;h=89ae7998da64f6bc5f51b80c074fb2d6c92474f2;hb=25203e5081c8da21869db1d16610f83f888249b5;hp=65f35d8e6f9099418282dfda5c4e3a4f118260b4;hpb=80784b782becfaa297e6d9cbb0584e27739cffc8;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php index 65f35d8e..89ae7998 100644 --- a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php +++ b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php @@ -46,7 +46,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand return 1; } } else { - $users = $this->getDoctrine()->getRepository('WallabagUserBundle:User')->findAll(); + $users = $this->get('wallabag_user.user_repository')->findAll(); $output->writeln(sprintf('Cleaning through %d user accounts', count($users))); @@ -66,7 +66,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand private function cleanDuplicates(User $user) { $em = $this->getContainer()->get('doctrine.orm.entity_manager'); - $repo = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry'); + $repo = $this->get('wallabag_core.entry_repository'); $entries = $repo->getAllEntriesIdAndUrl($user->getId()); @@ -109,7 +109,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand */ private function getUser($username) { - return $this->getDoctrine()->getRepository('WallabagUserBundle:User')->findOneByUserName($username); + return $this->get('wallabag_user.user_repository')->findOneByUserName($username); } private function getDoctrine()