From 0fc066c3d7d6152d58622e44dd62472b494a23d4 Mon Sep 17 00:00:00 2001 From: johnnyBrandom <42355639+johnnyBrandom@users.noreply.github.com> Date: Wed, 22 Mar 2023 11:21:00 -0400 Subject: [PATCH 1/4] Update INSTALLATION.md --- doc/INSTALLATION.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/INSTALLATION.md b/doc/INSTALLATION.md index 0ac9ff748..b0809e37f 100644 --- a/doc/INSTALLATION.md +++ b/doc/INSTALLATION.md @@ -2,7 +2,17 @@ Note: for users without web hosting service or existing environment, packages like [XAMMP](http://www.apachefriends.org/en/index.html) or [WampServer](http://www.wampserver.com/en/) can help you get set up quickly. -## Fresh Installation +# Fresh Installation + +## Server Configuration +In an Apache or simlar server environment, the following modules (or their equivalents) should be enabled for proper operation of the LibreBooking application: +* headers +* rewrite + +These modules are often not enabled by default and can be enabled in an **Apache2** environment as follows:
+```$ sudo a2enmod headers```
+```$ sudo a2enmod rewrite```
+```$ sudo service apache2 restart``` ## Application Deployment to Server From 6d443bf91c0636936e233f43c82ea5ef95c03b9f Mon Sep 17 00:00:00 2001 From: johnnyBrandom <42355639+johnnyBrandom@users.noreply.github.com> Date: Wed, 22 Mar 2023 11:23:10 -0400 Subject: [PATCH 2/4] Update INSTALLATION.md --- doc/INSTALLATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/INSTALLATION.md b/doc/INSTALLATION.md index b0809e37f..4496d53ef 100644 --- a/doc/INSTALLATION.md +++ b/doc/INSTALLATION.md @@ -5,7 +5,7 @@ Note: for users without web hosting service or existing environment, packages li # Fresh Installation ## Server Configuration -In an Apache or simlar server environment, the following modules (or their equivalents) should be enabled for proper operation of the LibreBooking application: +In an **Apache** or similar server environment, the following modules (or their equivalents) should be enabled for proper operation of the LibreBooking application: * headers * rewrite From ad4d3cec942e5dd18f844396decaebd1f7f71ce7 Mon Sep 17 00:00:00 2001 From: johnnyBrandom <42355639+johnnyBrandom@users.noreply.github.com> Date: Wed, 22 Mar 2023 12:54:06 -0400 Subject: [PATCH 3/4] Update INSTALLATION.md Added details about how to verify installed apache2 modules. --- doc/INSTALLATION.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/INSTALLATION.md b/doc/INSTALLATION.md index 4496d53ef..410348729 100644 --- a/doc/INSTALLATION.md +++ b/doc/INSTALLATION.md @@ -5,11 +5,14 @@ Note: for users without web hosting service or existing environment, packages li # Fresh Installation ## Server Configuration -In an **Apache** or similar server environment, the following modules (or their equivalents) should be enabled for proper operation of the LibreBooking application: +In an **Apache** or similar server environment, some required modules for LibreBooking may not be enabled by default. The following modules (or their equivalents) are often not enabled as part of a standard installation but should be enabled for proper operation of the LibreBooking application: * headers * rewrite -These modules are often not enabled by default and can be enabled in an **Apache2** environment as follows:
+The enabled modules in an **Apache2** environment can be verified as follows:
+```$ apachectl -M```
+ +If required modules are not present in the enabled list, modules can be enabled in an **Apache2** environment as follows:
```$ sudo a2enmod headers```
```$ sudo a2enmod rewrite```
```$ sudo service apache2 restart``` From 4c8ce39b497ce670d5765c380d80c4e2b6919fc4 Mon Sep 17 00:00:00 2001 From: Florian Werner <31065710+flotonus@users.noreply.github.com> Date: Sat, 25 Mar 2023 22:33:24 +0100 Subject: [PATCH 4/4] BUGFIX - API: reflect qry param in GetAvailability With GetAvailability(resourceId = null) the GET query parameter is not reflected in the response. Maybe this was intermittently set since there is an alternative route for GetAvailability that uses a static URI instead of a query parameter for resourceId. See /Web/Services/index.php . This fix prefers the route with explicit query params for resourceId and dateTime over the static route. Hence, the alternative route should be disabled with a subsequent change. Please feel free to correct me if I misunderstood the function signature or if there is a way to enable both routes. I have tried but the Slim framework seems not to allow alternative signatures on the same function. --- WebServices/ResourcesWebService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/WebServices/ResourcesWebService.php b/WebServices/ResourcesWebService.php index ec4484e89..5ebf40546 100644 --- a/WebServices/ResourcesWebService.php +++ b/WebServices/ResourcesWebService.php @@ -128,9 +128,10 @@ public function GetTypes() * @response ResourcesAvailabilityResponse * @return void */ - public function GetAvailability($resourceId = null) + public function GetAvailability() { $dateQueryString = $this->server->GetQueryString(WebServiceQueryStringKeys::DATE_TIME); + $resourceId = $this->server->GetQueryString(WebServiceQueryStringKeys::RESOURCE_ID); if (!empty($dateQueryString)) { $requestedTime = WebServiceDate::GetDate($dateQueryString, $this->server->GetSession()); @@ -144,7 +145,7 @@ public function GetAvailability($resourceId = null) $resources[] = $this->resourceRepository->LoadById($resourceId); } - $lastDateSearched = $requestedTime->AddDays(30); + $lastDateSearched = $requestedTime->AddDays(7); $reservations = $this->GetReservations($this->reservationRepository->GetReservations($requestedTime, $lastDateSearched, null, null, null, $resourceId)); $resourceAvailability = [];