diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-07 09:30:37 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-11-16 23:07:34 +0100 |
commit | f052f1fd57e51c8ae5ac17587636d608619a2057 (patch) | |
tree | 7b9169ff4522356d979ea94858d9cb892be90611 /src/Wallabag/CoreBundle/Helper | |
parent | 287204cda72c73e171cd1bf801bc08f7e5d7d111 (diff) | |
download | wallabag-f052f1fd57e51c8ae5ac17587636d608619a2057.tar.gz wallabag-f052f1fd57e51c8ae5ac17587636d608619a2057.tar.zst wallabag-f052f1fd57e51c8ae5ac17587636d608619a2057.zip |
Added constants for redirection values
Diffstat (limited to 'src/Wallabag/CoreBundle/Helper')
-rw-r--r-- | src/Wallabag/CoreBundle/Helper/Redirect.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Helper/Redirect.php b/src/Wallabag/CoreBundle/Helper/Redirect.php index 918d9266..59172db4 100644 --- a/src/Wallabag/CoreBundle/Helper/Redirect.php +++ b/src/Wallabag/CoreBundle/Helper/Redirect.php | |||
@@ -4,6 +4,7 @@ namespace Wallabag\CoreBundle\Helper; | |||
4 | 4 | ||
5 | use Symfony\Component\Routing\Router; | 5 | use Symfony\Component\Routing\Router; |
6 | use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; | 6 | use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; |
7 | use Wallabag\CoreBundle\Entity\Config; | ||
7 | 8 | ||
8 | /** | 9 | /** |
9 | * Manage redirections to avoid redirecting to empty routes. | 10 | * Manage redirections to avoid redirecting to empty routes. |
@@ -27,7 +28,7 @@ class Redirect | |||
27 | */ | 28 | */ |
28 | public function to($url, $fallback = '') | 29 | public function to($url, $fallback = '') |
29 | { | 30 | { |
30 | if ($this->actionMarkAsRead == 0) { | 31 | if (Config::REDIRECT_TO_HOMEPAGE === $this->actionMarkAsRead) { |
31 | return $this->router->generate('homepage'); | 32 | return $this->router->generate('homepage'); |
32 | } | 33 | } |
33 | 34 | ||