From 46821e617bffafd12f7d73d9ba47cc021604e9b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sat, 10 Apr 2021 15:05:07 +0200 Subject: [PATCH] Reduce connected period from 4 weeks to 3 weeks. --- Controller/DefaultController.php | 3 ++- Controller/LocationController.php | 4 ++-- Controller/SessionController.php | 4 ++-- Controller/UserController.php | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Controller/DefaultController.php b/Controller/DefaultController.php index eeb520c..ac25f63 100644 --- a/Controller/DefaultController.php +++ b/Controller/DefaultController.php @@ -267,7 +267,7 @@ class DefaultController { new \DateInterval('P1D'), //End with next sunday and 4 weeks new \DateTime( - $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 4 week':'Monday this week + 2 week' + $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 3 week':'Monday this week + 2 week' ) ); @@ -282,6 +282,7 @@ class DefaultController { return $this->render('@RapsysAir/default/index.html.twig', ['title' => $title, 'section' => $section, 'calendar' => $calendar, 'locations' => $locations]+$this->context); //Set Cache-Control must-revalidate directive + //TODO: add a javascript forced refresh after 1h ? or header refresh ? #$response->setPublic(true); #$response->setMaxAge(300); #$response->mustRevalidate(); diff --git a/Controller/LocationController.php b/Controller/LocationController.php index 6a77657..0cb09f3 100644 --- a/Controller/LocationController.php +++ b/Controller/LocationController.php @@ -295,7 +295,7 @@ class LocationController extends DefaultController { new \DateInterval('P1D'), //End with next sunday and 4 weeks new \DateTime( - $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 4 week':'Monday this week + 2 week' + $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 3 week':'Monday this week + 2 week' ) ); @@ -415,7 +415,7 @@ class LocationController extends DefaultController { new \DateInterval('P1D'), //End with next sunday and 4 weeks new \DateTime( - $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 4 week':'Monday this week + 2 week' + $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 3 week':'Monday this week + 2 week' ) ); diff --git a/Controller/SessionController.php b/Controller/SessionController.php index 26ceb94..30a0a73 100644 --- a/Controller/SessionController.php +++ b/Controller/SessionController.php @@ -464,7 +464,7 @@ class SessionController extends DefaultController { new \DateInterval('P1D'), //End with next sunday and 4 weeks new \DateTime( - $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 4 week':'Monday this week + 2 week' + $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 3 week':'Monday this week + 2 week' ) ); @@ -686,7 +686,7 @@ class SessionController extends DefaultController { new \DateInterval('P1D'), //End with next sunday and 4 weeks new \DateTime( - $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 4 week':'Monday this week + 2 week' + $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 3 week':'Monday this week + 2 week' ) ); diff --git a/Controller/UserController.php b/Controller/UserController.php index c78c69b..42023d4 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -53,7 +53,7 @@ class UserController extends DefaultController { new \DateInterval('P1D'), //End with next sunday and 4 weeks new \DateTime( - $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 4 week':'Monday this week + 2 week' + $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 3 week':'Monday this week + 2 week' ) ); @@ -126,7 +126,7 @@ class UserController extends DefaultController { new \DateInterval('P1D'), //End with next sunday and 4 weeks new \DateTime( - $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 4 week':'Monday this week + 2 week' + $this->isGranted('IS_AUTHENTICATED_REMEMBERED')?'Monday this week + 3 week':'Monday this week + 2 week' ) ); -- 2.41.1