diff options
-rw-r--r-- | includes/components/planner.inc | 4 | ||||
-rw-r--r-- | pages/api/schedule.php | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/includes/components/planner.inc b/includes/components/planner.inc index e82fdd6..bf3372a 100644 --- a/includes/components/planner.inc +++ b/includes/components/planner.inc @@ -517,9 +517,9 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis $relations = []; foreach (scoreOrderGlobal() as $member) { - $relations[$member['id']] = array_map(function ($i) { + $relations[$member['id']] = array_unique(array_map(function ($i) { return explode("/", $i)[1]; - }, [...($member["_metadata"]["marefriends"] ?? []), ...($member["_metadata"]["sisters"] ?? []), ...($member["_metadata"]["caretakers"] ?? [])]); + }, [...($member["_metadata"]["marefriends"] ?? []), ...($member["_metadata"]["sisters"] ?? []), ...($member["_metadata"]["caretakers"] ?? []), ...($member["_metadata"]["friends"] ?? []), ...($member["_metadata"]["sexfriends"] ?? [])])); } echo(base64_encode(json_encode($relations))) ?>`)); diff --git a/pages/api/schedule.php b/pages/api/schedule.php index 489e28f..2c29bcb 100644 --- a/pages/api/schedule.php +++ b/pages/api/schedule.php @@ -52,14 +52,14 @@ if (isset($raindrops[date('Y-m-d', time() + 86400)]) || isset($cloudburst[date(' if (isset($rd[$x])) { $item["raindrops"] = array_map(function ($i) { return getMemberWithoutSystem($i)["display_name"] ?? getMemberWithoutSystem($i)["name"]; }, array_filter($rd[$x], function ($i) { return isset($i); })); - } else if (isset($obj["today"][$x - 1]["raindrops"])) { - $item["raindrops"] = $obj["today"][$x - 1]["raindrops"]; + } else if (isset($obj["tomorrow"][$x - 1]["raindrops"])) { + $item["raindrops"] = $obj["tomorrow"][$x - 1]["raindrops"]; } if (isset($cb[$x])) { $item["cloudburst"] = array_map(function ($i) { return getMemberWithoutSystem($i)["display_name"] ?? getMemberWithoutSystem($i)["name"]; }, array_filter($cb[$x], function ($i) { return isset($i); })); - } else if (isset($obj["today"][$x - 1]["cloudburst"])) { - $item["cloudburst"] = $obj["today"][$x - 1]["cloudburst"]; + } else if (isset($obj["tomorrow"][$x - 1]["cloudburst"])) { + $item["cloudburst"] = $obj["tomorrow"][$x - 1]["cloudburst"]; } $obj["tomorrow"][] = $item; |