X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FCleanDuplicatesCommand.php;h=74da1e5f5292fe388eab92c8f701b990de018019;hb=03ce43d466daf9d085f5b521b223cb8b351a1c0e;hp=89ae7998da64f6bc5f51b80c074fb2d6c92474f2;hpb=18c38dffc67d04e59a9cc26b6910d9b9a4a49cd6;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php index 89ae7998..74da1e5f 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->get('wallabag_user.user_repository')->findAll(); + $users = $this->getContainer()->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->get('wallabag_core.entry_repository'); + $repo = $this->getContainer()->get('wallabag_core.entry_repository'); $entries = $repo->getAllEntriesIdAndUrl($user->getId()); @@ -109,7 +109,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand */ private function getUser($username) { - return $this->get('wallabag_user.user_repository')->findOneByUserName($username); + return $this->getContainer()->get('wallabag_user.user_repository')->findOneByUserName($username); } private function getDoctrine()