forked from wallabag/wallabag
Added constants for redirection values
This commit is contained in:
committed by
Jeremy Benoist
parent
287204cda7
commit
f052f1fd57
@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user