diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-03-30 16:40:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-30 16:40:18 +0200 |
commit | fa884b30ba0f8cb4231bd37fff23ef2f41ae6cfa (patch) | |
tree | d755e95b48baf9b05d717e3aa7f6045b34ef44f9 | |
parent | 5633b32f0a9b4d5e007e7b8b10e92344ba5495e4 (diff) | |
parent | 273b6f06584092f3b596406bf4c0d57aa738e8bf (diff) | |
download | wallabag-fa884b30ba0f8cb4231bd37fff23ef2f41ae6cfa.tar.gz wallabag-fa884b30ba0f8cb4231bd37fff23ef2f41ae6cfa.tar.zst wallabag-fa884b30ba0f8cb4231bd37fff23ef2f41ae6cfa.zip |
Merge pull request #3021 from wallabag/rename-method
Rename method
3 files changed, 4 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index f7398e69..8d2ac6d4 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -227,7 +227,7 @@ class EntryController extends Controller | |||
227 | public function showUnreadAction(Request $request, $page) | 227 | public function showUnreadAction(Request $request, $page) |
228 | { | 228 | { |
229 | // load the quickstart if no entry in database | 229 | // load the quickstart if no entry in database |
230 | if ($page == 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUsername($this->getUser()->getId()) == 0) { | 230 | if ($page == 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUser($this->getUser()->getId()) == 0) { |
231 | return $this->redirect($this->generateUrl('quickstart')); | 231 | return $this->redirect($this->generateUrl('quickstart')); |
232 | } | 232 | } |
233 | 233 | ||
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 4071301d..9325d261 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -328,7 +328,7 @@ class EntryRepository extends EntityRepository | |||
328 | * | 328 | * |
329 | * @return int | 329 | * @return int |
330 | */ | 330 | */ |
331 | public function countAllEntriesByUsername($userId) | 331 | public function countAllEntriesByUser($userId) |
332 | { | 332 | { |
333 | $qb = $this->createQueryBuilder('e') | 333 | $qb = $this->createQueryBuilder('e') |
334 | ->select('count(e)') | 334 | ->select('count(e)') |
diff --git a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php index beb0598a..8f2ca1cb 100644 --- a/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/ConfigControllerTest.php | |||
@@ -798,7 +798,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
798 | 798 | ||
799 | $entryReset = $em | 799 | $entryReset = $em |
800 | ->getRepository('WallabagCoreBundle:Entry') | 800 | ->getRepository('WallabagCoreBundle:Entry') |
801 | ->countAllEntriesByUsername($user->getId()); | 801 | ->countAllEntriesByUser($user->getId()); |
802 | 802 | ||
803 | $this->assertEquals(0, $entryReset, 'Entries were reset'); | 803 | $this->assertEquals(0, $entryReset, 'Entries were reset'); |
804 | } | 804 | } |
@@ -843,7 +843,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
843 | 843 | ||
844 | $entryReset = $em | 844 | $entryReset = $em |
845 | ->getRepository('WallabagCoreBundle:Entry') | 845 | ->getRepository('WallabagCoreBundle:Entry') |
846 | ->countAllEntriesByUsername($user->getId()); | 846 | ->countAllEntriesByUser($user->getId()); |
847 | 847 | ||
848 | $this->assertEquals(0, $entryReset, 'Entries were reset'); | 848 | $this->assertEquals(0, $entryReset, 'Entries were reset'); |
849 | 849 | ||