From 2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 18 Oct 2022 08:59:09 +0200 Subject: Update --- includes/banner.inc | 2 +- includes/footer.inc | 4 +- includes/functions.inc | 19 +- includes/header.inc | 393 +++++++++++------------------- includes/member.inc | 2 +- includes/member/hierarchy.inc | 2 + includes/mobilenav.inc | 88 +++++++ includes/navbar.inc | 72 ++++++ includes/navigation.inc | 379 ++++++++++++++++++++++++++++ includes/pages.json | 32 ++- includes/pane.inc | 129 ++++++++++ includes/planner.inc | 24 +- includes/rail.inc | 9 - includes/refresh.php | 14 -- includes/restore.inc | 130 ---------- includes/restore.php | 130 ++++++++++ includes/score.inc | 5 +- includes/search.inc | 10 +- includes/short.inc | 2 +- includes/sysbanner.inc | 41 ++-- includes/system.inc | 47 +++- includes/system/compare.inc | 2 +- includes/system/history.inc | 477 ++++-------------------------------- includes/system/history.old.inc | 528 ++++++++++++++++++++++++++++++++++++++++ includes/system/species.inc | 2 +- includes/system/tree.inc | 2 +- includes/titlebar.inc | 182 ++++++++++++++ includes/travelling.inc | 6 +- 28 files changed, 1827 insertions(+), 906 deletions(-) create mode 100644 includes/mobilenav.inc create mode 100644 includes/navbar.inc create mode 100644 includes/navigation.inc create mode 100644 includes/pane.inc delete mode 100644 includes/restore.inc create mode 100644 includes/restore.php create mode 100644 includes/system/history.old.inc create mode 100644 includes/titlebar.inc (limited to 'includes') diff --git a/includes/banner.inc b/includes/banner.inc index a3c6f10..e1b06be 100644 --- a/includes/banner.inc +++ b/includes/banner.inc @@ -190,7 +190,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { if ($travelling[$member['id']]["travelling"]) { $systemData['page'] = "/" . ($system === "gdapd" ? "cloudburst" : "raindrops"); - $systemData['icon'] = getAsset($system); + $systemData['icon'] = ($system === "gdapd" ? "cloudburst" : "raindrops") . ".png"; $systemData['name'] = $system === "gdapd" ? "Cloudburst" : "Raindrops"; $systemData['full_name'] = $system === "gdapd" ? "Cloudburst System" : "Raindrops System"; $systemData['subsystem'] = null; diff --git a/includes/footer.inc b/includes/footer.inc index 303b6f0..6cf833c 100644 --- a/includes/footer.inc +++ b/includes/footer.inc @@ -13,8 +13,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.inc"; ?> © Equestria.dev Developers · version 2...
- Data updated ( 360): ?>not updating; ; took ms, 0 ? (count($refresh["restored"]) > 1 ? "reported " . count($refresh["restored"]) . " failures" : "reported 1 failure") : "no failures reported" ?>) -


+ Data updated ( 360): ?>not updating; ; took ms, 0 ? (count($refresh["restored"]) > 1 ? "reported " . count($refresh["restored"]) . " failures" : "reported 1 failure") : "no failures reported" ?>) +




\ No newline at end of file diff --git a/includes/navbar.inc b/includes/navbar.inc new file mode 100644 index 0000000..379f102 --- /dev/null +++ b/includes/navbar.inc @@ -0,0 +1,72 @@ + + + + + \ No newline at end of file diff --git a/includes/navigation.inc b/includes/navigation.inc new file mode 100644 index 0000000..8ad019c --- /dev/null +++ b/includes/navigation.inc @@ -0,0 +1,379 @@ + true, + "name" => "Administrator", + "icon" => "/assets/icons/admin.svg", + "invert" => true, + "items" => [ + "alerts" => [ + "name" => null, + "minimal" => true, + "items" => [ + [ + "name" => $pages["emergency"]["name"], + "icon" => "/assets/icons/emergency.svg", + "invert" => false, + "link" => "/-/emergency", + "stepped" => "rgb(220,53,69)" + ], + [ + "name" => $pages["wakeup"]["name"], + "icon" => "/assets/icons/wakeup.svg", + "invert" => false, + "link" => "/-/wakeup", + "stepped" => "rgb(13,202,240)" + ], + [ + "name" => $pages["pleasure"]["name"], + "icon" => "/assets/icons/pleasure.svg", + "invert" => false, + "link" => "/-/pleasure", + "stepped" => "rgb(25,135,84)" + ] + ] + ], + "apps" => [ + "name" => "Applications", + "minimal" => false, + "items" => [ + [ + "name" => $pages["dashboard"]["name"], + "icon" => "/assets/icons/dashboard.svg", + "invert" => true, + "link" => "/-/dashboard", + "stepped" => null + ], + [ + "name" => $pages["about"]["name"], + "icon" => "/assets/icons/about.svg", + "invert" => true, + "link" => "/-/about", + "stepped" => null + ], + [ + "name" => $pages["fronting"]["name"], + "icon" => "/assets/icons/fronting.svg", + "invert" => true, + "link" => "/-/fronting", + "stepped" => null + ], + [ + "name" => $pages["actions"]["name"], + "icon" => "/assets/icons/actions.svg", + "invert" => true, + "link" => "/-/actions", + "stepped" => null + ], + [ + "name" => $pages["rules"]["name"], + "icon" => "/assets/icons/rules.svg", + "invert" => true, + "link" => "/-/rules", + "stepped" => null + ], + [ + "name" => $pages["docs"]["name"], + "icon" => "/assets/icons/docs.svg", + "invert" => true, + "link" => "/-/docs", + "stepped" => null + ], + [ + "name" => $pages["nicknames"]["name"], + "icon" => "/assets/icons/nicknames.svg", + "invert" => true, + "link" => "/-/nicknames", + "stepped" => null + ], + [ + "name" => $pages["together"]["name"], + "icon" => "/assets/icons/together.svg", + "invert" => true, + "link" => "/-/together", + "stepped" => null + ], + [ + "name" => $pages["splitting"]["name"], + "icon" => "/assets/icons/splitting.svg", + "invert" => true, + "link" => "/-/splitting", + "stepped" => null + ], + [ + "name" => $pages["byfront"]["name"], + "icon" => "/assets/icons/byfront.svg", + "invert" => true, + "link" => "/-/byfront", + "stepped" => null + ], + [ + "name" => $pages["travelling"]["name"], + "icon" => "/assets/icons/travelling.svg", + "invert" => true, + "link" => "/-/travelling", + "stepped" => null + ], + [ + "name" => $pages["stats"]["name"], + "icon" => "/assets/icons/stats.svg", + "invert" => true, + "link" => "/-/stats", + "stepped" => null + ], + [ + "name" => $pages["toys"]["name"], + "icon" => "/assets/icons/toys.svg", + "invert" => true, + "link" => "/-/toys", + "stepped" => null + ] + ] + ], + "debug" => [ + "name" => "Debugging", + "minimal" => false, + "items" => [ + [ + "name" => $pages["debug"]["name"], + "icon" => "/assets/icons/debug.svg", + "invert" => true, + "link" => "/-/debug", + "stepped" => null + ], + [ + "name" => $pages["bitset"]["name"], + "icon" => "/assets/icons/bitset.svg", + "invert" => true, + "link" => "/-/bitset", + "stepped" => null + ], + [ + "name" => $pages["score"]["name"], + "icon" => "/assets/icons/score.svg", + "invert" => true, + "link" => "/-/score", + "stepped" => null + ], + [ + "name" => $pages["logout"]["name"], + "icon" => "/assets/icons/logout.svg", + "invert" => true, + "link" => "/-/logout", + "stepped" => null + ] + ] + ] + ] +]; +$navigation_global = [ + "admin" => false, + "name" => "Global", + "icon" => "/assets/icons/global.svg", + "invert" => true, + "items" => [ + "main" => [ + "name" => null, + "minimal" => false, + "items" => [ + [ + "name" => $pages["home"]["name"], + "icon" => "/assets/icons/home.svg", + "invert" => true, + "link" => "/", + "stepped" => null + ], + [ + "name" => $pages["disclaimers"]["name"], + "icon" => "/assets/icons/disclaimers.svg", + "invert" => true, + "link" => "/-/disclaimers", + "stepped" => null + ], + [ + "name" => $pages["relations"]["name"], + "icon" => "/assets/icons/relations.svg", + "invert" => true, + "link" => "/-/relations", + "stepped" => null + ], + [ + "name" => $pages["government"]["name"], + "icon" => "/assets/icons/government.svg", + "invert" => true, + "link" => "/-/government", + "stepped" => null + ], + [ + "name" => $pages["terminology"]["name"], + "icon" => "/assets/icons/terminology.svg", + "invert" => true, + "link" => "/-/terminology", + "stepped" => null + ] + ] + ], + "tools" => [ + "name" => "Tools", + "minimal" => false, + "items" => [ + [ + "name" => $pages["parser"]["name"], + "icon" => "/assets/icons/parser.svg", + "invert" => true, + "link" => "/-/parser", + "stepped" => null + ], + [ + "name" => $pages["prefix"]["name"], + "icon" => "/assets/icons/prefix.svg", + "invert" => true, + "link" => "/-/prefix", + "stepped" => null + ] + ] + ] + ] +]; +$navigation_cloudburst = [ + "admin" => false, + "name" => "Cloudburst System", + "icon" => getAsset("ynmuc"), + "invert" => false, + "items" => [ + "header" => [ + "name" => null, + "minimal" => false, + "items" => [ + [ + "name" => "About us", + "icon" => "/assets/icons/about.svg", + "invert" => true, + "link" => "/cloudburst", + "stepped" => null + ] + ] + ], + "subsystems" => [ + "name" => "Subsystems", + "minimal" => false, + "items" => array_map(function ($subsystem) { + $ssData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/ynmuc-" . $subsystem['source'] . ".json"), true); + + return [ + "name" => $ssData['name'] ?? $subsystem['source'], + "icon" => "/assets/uploads/ss-$subsystem[source].png", + "invert" => false, + "link" => "/cloudburst/-/subsystem/$subsystem[source]", + "stepped" => null + ]; + }, $cloudburst_subsystemsNotMember) + ], + "members" => [ + "name" => "Members", + "minimal" => false, + "items" => array_map(function ($member) { + return [ + "name" => $member['display_name'] ?? $member['name'], + "icon" => getAsset($member["system"], $member["id"], "heads"), + "invert" => false, + "link" => "/$member[name]", + "stepped" => null + ]; + }, array_filter(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/ynmuc/members.json"), true), "ynmuc"), "ynmuc"), function ($member) { + return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; + })) + ] + ] +]; +$navigation_raindrops = [ + "admin" => false, + "name" => "Raindrops System", + "icon" => getAsset("gdapd"), + "invert" => false, + "items" => [ + "header" => [ + "name" => null, + "minimal" => false, + "items" => [ + [ + "name" => "About us", + "icon" => "/assets/icons/about.svg", + "invert" => true, + "link" => "/raindrops", + "stepped" => null + ] + ] + ], + "subsystems" => [ + "name" => "Subsystems", + "minimal" => false, + "items" => array_map(function ($subsystem) { + $ssData = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/subsystems/gdapd-" . $subsystem['source'] . ".json"), true); + + return [ + "name" => $ssData['name'] ?? $subsystem['source'], + "icon" => "/assets/uploads/ss-$subsystem[source].png", + "invert" => false, + "link" => "/raindrops/-/subsystem/$subsystem[source]", + "stepped" => null + ]; + }, $raindrops_subsystemsNotMember) + ], + "members" => [ + "name" => "Members", + "minimal" => false, + "items" => array_map(function ($member) { + return [ + "name" => $member['display_name'] ?? $member['name'], + "icon" => getAsset($member["system"], $member["id"], "heads"), + "invert" => false, + "link" => "/$member[name]", + "stepped" => null + ]; + }, array_filter(scoreOrder(withTravelers(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/gdapd/members.json"), true), "gdapd"), "gdapd"), function ($member) { + return $member['name'] !== "unknown" && $member['name'] !== "fusion" && $member['name'] !== "new"; + })) + ] + ] +]; + +global $parts; + +if (isset($parts) && isset($parts[0]) && $parts[0] === "cloudburst") { + $navigation = [ + "cloudburst" => $navigation_cloudburst, + "raindrops" => $navigation_raindrops, + "admin" => $navigation_admin, + "global" => $navigation_global + ]; +} elseif (isset($parts) && isset($parts[0]) && $parts[0] === "raindrops") { + $navigation = [ + "raindrops" => $navigation_raindrops, + "cloudburst" => $navigation_cloudburst, + "admin" => $navigation_admin, + "global" => $navigation_global + ]; +} else { + $navigation = [ + "admin" => $navigation_admin, + "global" => $navigation_global, + "cloudburst" => $navigation_cloudburst, + "raindrops" => $navigation_raindrops + ]; +} \ No newline at end of file diff --git a/includes/pages.json b/includes/pages.json index 704fcbb..cb05739 100644 --- a/includes/pages.json +++ b/includes/pages.json @@ -11,6 +11,12 @@ "admin": true, "rail": true }, + "alphabet": { + "name": "Members by prefix letters", + "short": null, + "admin": false, + "rail": false + }, "api": { "name": "API", "short": null, @@ -155,6 +161,30 @@ "admin": true, "rail": true }, + "s:compare": { + "name": "Compare members", + "short": null, + "admin": false, + "rail": false + }, + "s:history": { + "name": "Front history", + "short": null, + "admin": false, + "rail": false + }, + "s:species": { + "name": "Members by species", + "short": null, + "admin": false, + "rail": false + }, + "s:tree": { + "name": "System tree", + "short": null, + "admin": false, + "rail": false + }, "score": { "name": "Score system testing", "short": null, @@ -183,7 +213,7 @@ "name": "Watch Together", "short": "Together", "admin": true, - "rail": true + "rail": false }, "together-dev": { "name": "Watch Together (dev)", diff --git a/includes/pane.inc b/includes/pane.inc new file mode 100644 index 0000000..6aa7f98 --- /dev/null +++ b/includes/pane.inc @@ -0,0 +1,129 @@ + + +
)"> + +
+ + + + Search in the website... + + + + + + Not logged in + + + + $item): if (!$item["admin"] || $isLoggedIn): ?> + +
+
+ " class="dropdown-icon" alt="" style="width:24px;vertical-align: middle;"> + +
+ + + + +
+ + + + \ No newline at end of file diff --git a/includes/planner.inc b/includes/planner.inc index da25770..69e0331 100644 --- a/includes/planner.inc +++ b/includes/planner.inc @@ -194,24 +194,12 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis - + + + + + + diff --git a/includes/rail.inc b/includes/rail.inc index b2ed467..e78815e 100644 --- a/includes/rail.inc +++ b/includes/rail.inc @@ -164,13 +164,4 @@ document.getElementById("rail").onmouseleave = () => { document.getElementById("rail-text").style.opacity = "0"; } - - window.onscroll = () => { - let scroll = document.getElementsByTagName("html")[0].scrollTop; - let pos = 60 - scroll; - - if (pos <= 0) pos = 0; - document.getElementById("rail").style.top = pos + "px"; - document.getElementById("rail-text").style.top = pos + "px"; - } \ No newline at end of file diff --git a/includes/refresh.php b/includes/refresh.php index e8e12dd..ff8d1eb 100644 --- a/includes/refresh.php +++ b/includes/refresh.php @@ -223,20 +223,6 @@ foreach (json_decode(file_get_contents("./data/ynmuc/members.json"), true) as $m $times["images-ynmuc-" . $member['id']] = microtime(true) - $currentOpStart2; } -$currentOpStart = microtime(true); -function isJson($string): bool { - json_decode($string); - return (json_last_error() === JSON_ERROR_NONE); -} - -foreach ($files as $file) { - if (trim(file_get_contents("./data/" . $file)) === "" || (isJson(trim(file_get_contents("./data/" . $file))) && isset(json_decode(trim(file_get_contents("./data/" . $file)), true)["message"])) && !str_ends_with($file, ".html")) { - $restored[] = $file; - copy("./data/backup/" . $file, "./data/" . $file); - } -} -$times["restore"] = microtime(true) - $currentOpStart; - echo("Backing up...\n"); if (date('i') === "00") { diff --git a/includes/restore.inc b/includes/restore.inc deleted file mode 100644 index 72748ab..0000000 --- a/includes/restore.inc +++ /dev/null @@ -1,130 +0,0 @@ -= 0) { - return $tense = "now"; - } elseif ($difference > 0) { - $tense = "ago"; - } else { - $tense = "later"; - } - - for ($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) { - $difference /= $lengths[$j]; - } - - $difference = round($difference); - - $period = $periods[$j] . ($difference >1 ? "s" :''); - return "{$difference} {$period} {$tense}"; -} - -if (!isset($_SERVER['argv'][1]) || !isset($_SERVER['argv'][2])) { - echo("Usage: php " . $_SERVER['argv'][0] . " \n"); - die(); -} else { - $file = @file_get_contents($_SERVER['argv'][1]); - $raw = @file_get_contents($_SERVER['argv'][2]); - - if ($file === false) { - echo("Unable to open backup file\n"); - die(); - } - - if ($raw === false) { - echo("Unable to open key file\n"); - die(); - } - - $raw2 = base64_decode($raw); - - if (!isJson($raw2)) { - echo("Key file is corrupt\n"); - die(); - } - - $keydata = json_decode($raw2, true); - - if (!is_array($keydata) || !isset($keydata["iv"]) || !isset($keydata["key"])) { - echo("Key file is invalid\n"); - die(); - } - - $iv = hex2bin($keydata["iv"]); - $key = hex2bin($keydata["key"]); - - $decrypted = openssl_decrypt($file, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv); - - if ($decrypted === false) { - echo("Unable to decrypt backup\n"); - die(); - } - - $unpadded = pkcs7_unpad($decrypted); - - if (!is_string($unpadded)) { - echo("Unable to decrypt backup\n"); - die(); - } - - if (!isJson($unpadded)) { - echo("Backup is corrupt\n"); - die(); - } - - $data = json_decode($unpadded, true); - - if (!is_array($data) || !isset($data["date"]) || !isset($data["files"])) { - echo("Backup is invalid\n"); - die(); - } - - echo(realpath($_SERVER['argv'][1]) . "\n Key: " . $_SERVER['argv'][2] . "\n Date: " . date('r', strtotime($data["date"])) . " (" . timeAgo($data["date"]) . ")" . "\n Contents: " . count($data["files"]) . " files\n"); - - @mkdir("./_restored"); - - $index = 0; - foreach ($data["files"] as $file) { - if ($file["dir"] === "") { - print("[$index] /" . $file["file"] . "\n"); - } else { - print("[$index] /" . $file["dir"] . "/" . $file["file"] . "\n"); - } - - $content = base64_decode($file["content"]); - if (sha1($content) !== $file["checksum"][0]) { - print(" Backed up file is corrupted (SHA1 mismatch)\n Expected: " . $file["checksum"][0] . "\n Got: " . sha1($content) . "\n"); - die("Backup aborted.\n"); - } - if (md5($content) !== $file["checksum"][1]) { - print(" Backed up file is corrupted (MD5 mismatch)\n Expected: " . $file["checksum"][1] . "\n Got: " . md5($content) . "\n"); - die("Backup aborted.\n"); - } - - @mkdir("./_restored/" . $file["dir"], 0777, true); - file_put_contents("./_restored/" . $file["dir"] . "/" . $file["file"], $content); - - $index++; - } - - print("Restored backup to ./_restored; review files before restoring to production\n"); -} \ No newline at end of file diff --git a/includes/restore.php b/includes/restore.php new file mode 100644 index 0000000..72748ab --- /dev/null +++ b/includes/restore.php @@ -0,0 +1,130 @@ += 0) { + return $tense = "now"; + } elseif ($difference > 0) { + $tense = "ago"; + } else { + $tense = "later"; + } + + for ($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) { + $difference /= $lengths[$j]; + } + + $difference = round($difference); + + $period = $periods[$j] . ($difference >1 ? "s" :''); + return "{$difference} {$period} {$tense}"; +} + +if (!isset($_SERVER['argv'][1]) || !isset($_SERVER['argv'][2])) { + echo("Usage: php " . $_SERVER['argv'][0] . " \n"); + die(); +} else { + $file = @file_get_contents($_SERVER['argv'][1]); + $raw = @file_get_contents($_SERVER['argv'][2]); + + if ($file === false) { + echo("Unable to open backup file\n"); + die(); + } + + if ($raw === false) { + echo("Unable to open key file\n"); + die(); + } + + $raw2 = base64_decode($raw); + + if (!isJson($raw2)) { + echo("Key file is corrupt\n"); + die(); + } + + $keydata = json_decode($raw2, true); + + if (!is_array($keydata) || !isset($keydata["iv"]) || !isset($keydata["key"])) { + echo("Key file is invalid\n"); + die(); + } + + $iv = hex2bin($keydata["iv"]); + $key = hex2bin($keydata["key"]); + + $decrypted = openssl_decrypt($file, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv); + + if ($decrypted === false) { + echo("Unable to decrypt backup\n"); + die(); + } + + $unpadded = pkcs7_unpad($decrypted); + + if (!is_string($unpadded)) { + echo("Unable to decrypt backup\n"); + die(); + } + + if (!isJson($unpadded)) { + echo("Backup is corrupt\n"); + die(); + } + + $data = json_decode($unpadded, true); + + if (!is_array($data) || !isset($data["date"]) || !isset($data["files"])) { + echo("Backup is invalid\n"); + die(); + } + + echo(realpath($_SERVER['argv'][1]) . "\n Key: " . $_SERVER['argv'][2] . "\n Date: " . date('r', strtotime($data["date"])) . " (" . timeAgo($data["date"]) . ")" . "\n Contents: " . count($data["files"]) . " files\n"); + + @mkdir("./_restored"); + + $index = 0; + foreach ($data["files"] as $file) { + if ($file["dir"] === "") { + print("[$index] /" . $file["file"] . "\n"); + } else { + print("[$index] /" . $file["dir"] . "/" . $file["file"] . "\n"); + } + + $content = base64_decode($file["content"]); + if (sha1($content) !== $file["checksum"][0]) { + print(" Backed up file is corrupted (SHA1 mismatch)\n Expected: " . $file["checksum"][0] . "\n Got: " . sha1($content) . "\n"); + die("Backup aborted.\n"); + } + if (md5($content) !== $file["checksum"][1]) { + print(" Backed up file is corrupted (MD5 mismatch)\n Expected: " . $file["checksum"][1] . "\n Got: " . md5($content) . "\n"); + die("Backup aborted.\n"); + } + + @mkdir("./_restored/" . $file["dir"], 0777, true); + file_put_contents("./_restored/" . $file["dir"] . "/" . $file["file"], $content); + + $index++; + } + + print("Restored backup to ./_restored; review files before restoring to production\n"); +} \ No newline at end of file diff --git a/includes/score.inc b/includes/score.inc index c35e9bc..80a90d1 100644 --- a/includes/score.inc +++ b/includes/score.inc @@ -15,8 +15,8 @@ function calculateScore($metadata, $name) { $scoreAdd = 0; if ($name === "Cloudy Dreams") $scoreAdd += 250; - if ($name === "Zoom Zephyrwing") $scoreAdd += 250; - if ($name === "Thunder") $scoreAdd += 250; + if ($name === "Zoom Zephyrwing") $scoreAdd += 2500; + if ($name === "Thunder") $scoreAdd += 2500; if ($name === "Scoots/Mia") $scoreAdd -= 495; $score = $scoreHost + $scoreFictive + $scoreLittle + $scoreNotTalking + $scoreProtector + $scoreSharedMemory + $scoreRelations + $scoreSpecies + $scoreName + $scoreMedian + $scoreAdd; @@ -43,6 +43,7 @@ function scoreOrder($members, $system) { if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_ends_with($member["name"], "-travelling") && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json")) { $systemID = $member["system"] ?? $system; + $member["_system"] = $member["system"] = $systemID; $member["_metadata"] = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json"), true)); $member["_score"] = calculateScore(parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json"), true)), $member["display_name"] ?? $member["name"]); $ordered[] = $member; diff --git a/includes/search.inc b/includes/search.inc index d8e573f..f240363 100644 --- a/includes/search.inc +++ b/includes/search.inc @@ -1,7 +1,7 @@ -