]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/EntryController.php
Redirect to the current view instead of homepage
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / EntryController.php
index ab50ebdfdf7550f82f09a83e2bf74d64743c3e66..dfb5eb5490c2ad502015238abaea05e6dd985a9e 100644 (file)
@@ -251,7 +251,7 @@ 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"})
      *
@@ -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()]));