adapt to new soko-web interfaces
This commit is contained in:
parent
45b34cb514
commit
75fad05362
9
web.php
9
web.php
@ -4,6 +4,7 @@ use SokoWeb\Response\HttpResponse;
|
|||||||
use SokoWeb\Routing\RouteCollection;
|
use SokoWeb\Routing\RouteCollection;
|
||||||
use SokoWeb\Session\DatabaseSessionHandler;
|
use SokoWeb\Session\DatabaseSessionHandler;
|
||||||
use SokoWeb\Request\Request;
|
use SokoWeb\Request\Request;
|
||||||
|
use SokoWeb\Request\Session;
|
||||||
use MapGuesser\Controller\MapsController;
|
use MapGuesser\Controller\MapsController;
|
||||||
use MapGuesser\Controller\HomeController;
|
use MapGuesser\Controller\HomeController;
|
||||||
use MapGuesser\Controller\LoginController;
|
use MapGuesser\Controller\LoginController;
|
||||||
@ -90,7 +91,11 @@ Container::$routeCollection->group('admin', function (RouteCollection $routeColl
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (isset($_COOKIE['COOKIES_CONSENT'])) {
|
if (isset($_COOKIE['COOKIES_CONSENT'])) {
|
||||||
Container::$sessionHandler = new DatabaseSessionHandler(Container::$dbConnection);
|
Container::$sessionHandler = new DatabaseSessionHandler(
|
||||||
|
Container::$dbConnection,
|
||||||
|
'sessions',
|
||||||
|
new DateTime('-7 days')
|
||||||
|
);
|
||||||
|
|
||||||
session_set_save_handler(Container::$sessionHandler, true);
|
session_set_save_handler(Container::$sessionHandler, true);
|
||||||
session_start([
|
session_start([
|
||||||
@ -124,7 +129,7 @@ Container::$request = new Request(
|
|||||||
$_GET,
|
$_GET,
|
||||||
$_POST,
|
$_POST,
|
||||||
getallheaders(),
|
getallheaders(),
|
||||||
$_SESSION,
|
new Session($_SESSION),
|
||||||
new UserRepository()
|
new UserRepository()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user