diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-01-09 14:34:49 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@smile.fr> | 2016-01-15 15:01:30 +0100 |
commit | 5c072d2b57b2b5f95b25411909ac8a6af2ef6ebe (patch) | |
tree | 1224140aff058371464d2737a6a3d6ae17f34d06 /src/Wallabag/CoreBundle/Controller/EntryController.php | |
parent | 0aafb8dfcb098ae586dc87f3487b4948f8ae2314 (diff) | |
download | wallabag-5c072d2b57b2b5f95b25411909ac8a6af2ef6ebe.tar.gz wallabag-5c072d2b57b2b5f95b25411909ac8a6af2ef6ebe.tar.zst wallabag-5c072d2b57b2b5f95b25411909ac8a6af2ef6ebe.zip |
Quickstart for beginners
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/EntryController.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/EntryController.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 37f7ab60..3d22c7bc 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php | |||
@@ -166,6 +166,11 @@ class EntryController extends Controller | |||
166 | */ | 166 | */ |
167 | public function showUnreadAction(Request $request, $page) | 167 | public function showUnreadAction(Request $request, $page) |
168 | { | 168 | { |
169 | // load the quickstart if no entry in database | ||
170 | if ($page == 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUsername($this->getUser()->getId()) == 0) { | ||
171 | return $this->redirect($this->generateUrl('quickstart')); | ||
172 | } | ||
173 | |||
169 | return $this->showEntries('unread', $request, $page); | 174 | return $this->showEntries('unread', $request, $page); |
170 | } | 175 | } |
171 | 176 | ||
@@ -211,7 +216,7 @@ class EntryController extends Controller | |||
211 | */ | 216 | */ |
212 | private function showEntries($type, Request $request, $page) | 217 | private function showEntries($type, Request $request, $page) |
213 | { | 218 | { |
214 | $repository = $this->getDoctrine()->getRepository('WallabagCoreBundle:Entry'); | 219 | $repository = $this->get('wallabag_core.entry_repository'); |
215 | 220 | ||
216 | switch ($type) { | 221 | switch ($type) { |
217 | case 'starred': | 222 | case 'starred': |