diff options
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': |