From 633c92eae865e957121e08de634aeee11a8b3992 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Mon, 24 Apr 2023 14:03:36 +0200 Subject: Updated 18 files, added 1692 files and deleted includes/system/compare.inc (automated) --- includes/components/planner.inc | 42 ++++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 11 deletions(-) (limited to 'includes/components') diff --git a/includes/components/planner.inc b/includes/components/planner.inc index 36a21ae..e82fdd6 100644 --- a/includes/components/planner.inc +++ b/includes/components/planner.inc @@ -288,7 +288,12 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis + + if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json", "{}"); + $cache = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/planner.json"), true); + + if (!isset($cache["content"]) || date('Y-m-d') !== $cache["day"]) { + ob_start(); ?>