summaryrefslogtreecommitdiff
path: root/includes/util
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-03-25 16:01:48 +0100
committerRaindropsSys <contact@minteck.org>2023-03-25 16:01:48 +0100
commitbbf526b19c9831349a3b836f83b63363e6b33609 (patch)
treed75c5b9bcfbd73f642017c294807a997711ef479 /includes/util
parent609dc69c1332813c3a367e184663e498c4f559ff (diff)
downloadpluralconnect-bbf526b19c9831349a3b836f83b63363e6b33609.tar.gz
pluralconnect-bbf526b19c9831349a3b836f83b63363e6b33609.tar.bz2
pluralconnect-bbf526b19c9831349a3b836f83b63363e6b33609.zip
Updated 7 files (automated)
Diffstat (limited to 'includes/util')
-rw-r--r--includes/util/score.inc18
-rw-r--r--includes/util/short.inc3
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) {