diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-01-15 15:21:43 +0100 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-01-15 15:21:43 +0100 |
commit | 790573d45899504bdecd2573c8f64018e23b139e (patch) | |
tree | 58715ecffdaa63660f30447e64fcf892d06a223f /src/Wallabag/CoreBundle/Controller/EntryController.php | |
parent | 9ee44a109a93ce8af5a85fb1ba349d390623454d (diff) | |
parent | 5c072d2b57b2b5f95b25411909ac8a6af2ef6ebe (diff) | |
download | wallabag-790573d45899504bdecd2573c8f64018e23b139e.tar.gz wallabag-790573d45899504bdecd2573c8f64018e23b139e.tar.zst wallabag-790573d45899504bdecd2573c8f64018e23b139e.zip |
Merge pull request #1560 from wallabag/v2-quickstart
Fix #1501 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': |