From 67506737799320f2f16797f73f33e3d735f1fdb4 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Tue, 23 Jan 2024 09:42:34 +0100 Subject: [PATCH] fixed: allow to display events of current day only --- ics.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ics.php b/ics.php index af776e5..c62b8bd 100644 --- a/ics.php +++ b/ics.php @@ -94,7 +94,11 @@ function showresult() if (xhr.status == 200) { var params = new URLSearchParams(window.location.search); - var recent = parseInt(params.get("recent")) || 7; + var recent = parseInt(params.get("recent")); + if (isNaN(recent)) + { + recent = 7; + } var html = "

Evénements à venir

"; html += "

En gras: modifié les " + recent + " derniers jours

"; var o = ics2json(xhr.responseText);