From 2b192b3840ac344c456b98304ea400f0af90da15 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 13 Jan 2024 16:12:11 +0100 Subject: Updated 46 files and deleted 19 files (automated) --- includes/util/travelling.inc | 61 ++------------------------------------------ 1 file changed, 2 insertions(+), 59 deletions(-) (limited to 'includes/util/travelling.inc') diff --git a/includes/util/travelling.inc b/includes/util/travelling.inc index eced4f2..b1479fb 100644 --- a/includes/util/travelling.inc +++ b/includes/util/travelling.inc @@ -1,62 +1,5 @@ false, - "history" => [] - ]; - - @file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/travelling/travelling.json", utf8_encode(json_encode($travelling, JSON_PRETTY_PRINT))); - } - - if (!isset($travelling[$member["id"]]["equestria"])) { - $travelling[$member["id"]]["equestria"] = false; - } -} - -function withTravelers(array $members, string $system): array { - global $travelling; - global $app; - - if ($system === $app["other"]["id"]) { - return $members; - } else { - return [ - ...array_map(function ($i) use ($system) { - $i['system'] = $system; - return $i; - }, array_filter($members, function ($i) use ($travelling) { - return !(isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria'])); - })), - ...array_filter(array_map(function ($i) use ($system) { - $i['system'] = $system === "gdapd" ? "ynmuc" : "gdapd"; - return $i; - }, json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($system === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true)), function ($i) use ($travelling) { - return isset($travelling[$i['id']]) && $travelling[$i['id']]['travelling'] && (!isset($travelling[$i['id']]['equestria']) || !$travelling[$i['id']]['equestria']); - }) - ]; - } +function withTravelers(array $members): array { + return $members; } \ No newline at end of file -- cgit