Permet de poster un commentaire sans être connecté
This commit is contained in:
@@ -10,14 +10,12 @@ $loader->register();
|
||||
|
||||
$security = new \Silex\Controller\SecurityController();
|
||||
$visitor = new \Silex\Controller\VisitorController();
|
||||
$user = new \Silex\Controller\UserController();
|
||||
$admin = new \Silex\Controller\AdminController();
|
||||
$router = new Router($_SERVER['REQUEST_URI']);
|
||||
$router->setBasePath("~cofrizot/silex/index.php");
|
||||
$router->get('/^$/', [$visitor, 'index']);
|
||||
$router->get('/^recent\/(?<page>\d+)$/', [$visitor, 'index']);
|
||||
$router->get('/^news\/(?<slug>[A-Za-z0-9-]+)-(?<id>\d+)$/', [$visitor, 'viewPost']);
|
||||
$router->post('/^comment\/(?<id>\d+)$/', [$user, 'comment']);
|
||||
$router->post('/^comment\/(?<id>\d+)$/', [$visitor, 'comment']);
|
||||
$router->match('/^login$/', [$security, 'login']);
|
||||
$router->match('/^register$/', [$security, 'register']);
|
||||
$router->match('/^logout$/', [$security, 'logout']);
|
||||
|
Reference in New Issue
Block a user