X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FController%2FEntryController.php;h=840dc254420794f5a2147329fd6cc9209a8bd06d;hb=3ef055ced3d6ea0d2f15ba660602545f477e9c3c;hp=3dcfbebeeb00f94afde4cf42dc658411a026b395;hpb=854616ac6d6246e8e0451342ab841985b401604d;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index 3dcfbebe..840dc254 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -195,7 +195,7 @@ class EntryController extends Controller public function showUnreadAction(Request $request, $page) { // load the quickstart if no entry in database - if ((int) $page === 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUser($this->getUser()->getId()) === 0) { + if (1 === (int) $page && 0 === $this->get('wallabag_core.entry_repository')->countAllEntriesByUser($this->getUser()->getId())) { return $this->redirect($this->generateUrl('quickstart')); } @@ -333,6 +333,7 @@ class EntryController extends Controller $this->checkUserAction($entry); $entry->toggleStar(); + $entry->updateStar($entry->isStarred()); $this->getDoctrine()->getManager()->flush(); $message = 'flashes.entry.notice.entry_unstarred';