1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-22 17:18:37 +00:00

Redirect to the current view instead of homepage

This commit is contained in:
Jeremy Benoist 2018-10-12 22:13:33 +02:00
parent 90a0d086a8
commit 9a57653aec
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
2 changed files with 18 additions and 19 deletions

View 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()]));