From f052f1fd57e51c8ae5ac17587636d608619a2057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 7 Nov 2016 09:30:37 +0100 Subject: Added constants for redirection values --- src/Wallabag/CoreBundle/Helper/Redirect.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Helper/Redirect.php') 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; use Symfony\Component\Routing\Router; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; +use Wallabag\CoreBundle\Entity\Config; /** * Manage redirections to avoid redirecting to empty routes. @@ -27,7 +28,7 @@ class Redirect */ public function to($url, $fallback = '') { - if ($this->actionMarkAsRead == 0) { + if (Config::REDIRECT_TO_HOMEPAGE === $this->actionMarkAsRead) { return $this->router->generate('homepage'); } -- cgit v1.2.3