From 25f3023ff36d3fc2afcba1f910372a19f95b69a5 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Mon, 26 Jun 2023 19:34:34 +0200 Subject: Updated includes/components/timeline.inc and added pages/api/violette.php (automated) --- includes/components/timeline.inc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'includes/components') diff --git a/includes/components/timeline.inc b/includes/components/timeline.inc index 0ec8870..1a34550 100644 --- a/includes/components/timeline.inc +++ b/includes/components/timeline.inc @@ -52,9 +52,13 @@ function displayTimeline($systems) { global $app; $showIcons = count($systems) > $correct = $switches[$index - 1]; $v = floor((strtotime($switch["timestamp"]) - $time) / 60); - echo('' . implode(", ", array_map(function ($i) { - return getMemberWithoutSystem($i)["display_name"] ?? getMemberWithoutSystem($i)["name"] ?? $i; - }, $correct["members"])) . ''); + if (count($correct["members"]) > 0) { + echo('' . implode(", ", array_map(function ($i) { + return getMemberWithoutSystem($i)["display_name"] ?? getMemberWithoutSystem($i)["name"] ?? $i; + }, $correct["members"])) . ''); + } else { + echo(''); + } $leftCols -= $v; if ($leftCols < 0) $leftCols = 0; $time = strtotime($switch["timestamp"]); @@ -80,8 +84,8 @@ function displayTimeline($systems) { global $app; $showIcons = count($systems) > -5h -4h -3h - -2 - -1 + -2h + -1h Now -- cgit