diff options
Diffstat (limited to 'includes/util')
-rw-r--r-- | includes/util/score.inc | 18 | ||||
-rw-r--r-- | includes/util/short.inc | 3 |
2 files changed, 17 insertions, 4 deletions
diff --git a/includes/util/score.inc b/includes/util/score.inc index 57c7a75..ad3c8e4 100644 --- a/includes/util/score.inc +++ b/includes/util/score.inc @@ -1,6 +1,9 @@ <?php function scoreOrder($members, $system, $useDominant = false) { + global $isLowerLoggedIn; + global $isLoggedIn; + $ordered = []; foreach ($members as $member) { if ($member["name"] !== "unknown" && $member["name"] !== "fusion" && $member["name"] !== "new" && !str_starts_with($member["name"], "smol") && !str_ends_with($member["name"], "-travelling") && file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json")) { @@ -34,7 +37,10 @@ function scoreOrder($members, $system, $useDominant = false) { $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"] = $hsl[0]; - $ordered[] = $member; + + if (!isset($member["_metadata"]["private"]) || !$member["_metadata"]["private"] || $isLoggedIn || $isLowerLoggedIn) { + $ordered[] = $member; + } } } @@ -71,7 +77,10 @@ function scoreOrderGlobal() { $member["_system"] = "gdapd"; $member["system"] = "gdapd"; $member["_metadata"] = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json"), true)); - $ordered[] = $member; + + if (!isset($member["_metadata"]["private"]) || !$member["_metadata"]["private"] || $isLoggedIn || $isLowerLoggedIn) { + $ordered[] = $member; + } } } @@ -96,7 +105,10 @@ function scoreOrderGlobal() { $member["_system"] = "ynmuc"; $member["system"] = "ynmuc"; $member["_metadata"] = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/$member[id].json"), true)); - $ordered[] = $member; + + if (!isset($member["_metadata"]["private"]) || !$member["_metadata"]["private"] || $isLoggedIn || $isLowerLoggedIn) { + $ordered[] = $member; + } } } diff --git a/includes/util/short.inc b/includes/util/short.inc index 39e42b0..c226e3b 100644 --- a/includes/util/short.inc +++ b/includes/util/short.inc @@ -12,13 +12,14 @@ $list = [ "rd" => "/raindrops", "cb" => "/cloudburst", "minty" => "/cloudydreams", + "violetdawn" => "/sandydawn", "twilight" => "/twi", "luna" => "/princessluna", "cloudy" => "/cloudydreams", "zipp" => "/zippstorm", "babs" => "/babsseed", "frost" => "/frostcrystals", - "violet" => "/violetdawn" + "violet" => "/sandydawn" ]; foreach ($members as $member) { |