]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/EntryController.php
Move icon into the top menu bar
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / EntryController.php
index ab50ebdfdf7550f82f09a83e2bf74d64743c3e66..5c8ecb402f661c31bcabcaaf4dd57070f06dc1da 100644 (file)
@@ -251,9 +251,9 @@ class EntryController extends Controller
     /**
      * Shows random entry depending on the given type.
      *
-     * @param Entry $entry
+     * @param string $type
      *
-     * @Route("/{type}/random", name="random_entry", requirements={"_locale": "unread|starred|archive|untagged|all"})
+     * @Route("/{type}/random", name="random_entry", requirements={"type": "unread|starred|archive|untagged|all"})
      *
      * @return \Symfony\Component\HttpFoundation\RedirectResponse
      */
@@ -267,7 +267,7 @@ class EntryController extends Controller
             $bag->clear();
             $bag->add('notice', 'flashes.entry.notice.no_random_entry');
 
-            return $this->redirect($this->generateUrl('homepage'));
+            return $this->redirect($this->generateUrl($type));
         }
 
         return $this->redirect($this->generateUrl('view', ['id' => $entry->getId()]));