From 06282c1aa419eacefacf444f93b7e0f76603c6e9 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 9 Jun 2016 21:15:44 +0200 Subject: [PATCH] Redirect empty video page to index --- controllers/FrontController.php | 2 ++ index.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 1c8939a..5efd34c 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -224,6 +224,8 @@ class FrontController ); $container->view->render($response, 'footer.tpl'); } + } else { + return $response->withRedirect($container->get('router')->pathFor('index')); } } diff --git a/index.php b/index.php index 9a33cd7..d3a1764 100644 --- a/index.php +++ b/index.php @@ -35,7 +35,7 @@ $container['errorHandler'] = array($controller, 'error'); $app->get( '/', array($controller, 'index') -); +)->setName('index'); $app->get( '/extractors', array($controller, 'extractors')