diff options
author | RaindropsSys <contact@minteck.org> | 2023-04-02 23:03:02 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-04-02 23:03:02 +0200 |
commit | 02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b (patch) | |
tree | 6d1dec61008998aadc6b69f7e750712794d99324 /includes/util/banner.inc | |
parent | f559308a1b42a9036135d764374a8c007b7d70a9 (diff) | |
download | pluralconnect-02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b.tar.gz pluralconnect-02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b.tar.bz2 pluralconnect-02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b.zip |
Updated 35 files, added 11 files and deleted includes/components/search.inc (automated)
Diffstat (limited to 'includes/util/banner.inc')
-rw-r--r-- | includes/util/banner.inc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/includes/util/banner.inc b/includes/util/banner.inc index 1657233..947e5c6 100644 --- a/includes/util/banner.inc +++ b/includes/util/banner.inc @@ -1,6 +1,6 @@ <?php -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $lang; global $pages; +require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $lang; global $pages; global $isLowerLoggedIn; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/pronouns.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/functions.inc"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/Parsedown.php"; $Parsedown = new Parsedown(); @@ -21,6 +21,7 @@ function _header_getMember(string $id, $system) { function getMemberBannerData(string $id, string $system, bool $french = false) { global $travelling; global $isLoggedIn; + global $isLowerLoggedIn; global $lang; global $Parsedown; @@ -155,7 +156,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { ]; } - $app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); + $app = $GLOBALS["ColdHazeApp"]; $systemData = []; $systemData['page'] = "/" . ($system === "gdapd" ? "raindrops" : ($system === $app["other"]["id"] ? $app["other"]["slug"] : "cloudburst")); @@ -190,7 +191,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { sort($mfMember); $mfMember = $mfMember[0]; - $marefriends[] = [ + if (!($mfSystem === $app["other"]["id"] && !$isLoggedIn && !$isLowerLoggedIn)) $marefriends[] = [ "id" => $marefriend, "link" => "/" . ($mfMember["name"]), "icon" => getAsset($mfSystem, $mfMemberID, "heads"), @@ -212,7 +213,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { sort($mfMember); $mfMember = $mfMember[0]; - $sexfriends[] = [ + if (!($mfSystem === $app["other"]["id"] && !$isLoggedIn && !$isLowerLoggedIn)) $sexfriends[] = [ "id" => $marefriend, "link" => "/" . ($mfMember["name"]), "icon" => getAsset($mfSystem, $mfMemberID, "heads"), @@ -232,7 +233,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { sort($mfMember); $mfMember = $mfMember[0]; - $sisters[] = [ + if (!($mfSystem === $app["other"]["id"] && !$isLoggedIn && !$isLowerLoggedIn)) $sisters[] = [ "id" => $marefriend, "link" => "/" . ($mfMember["name"]), "icon" => getAsset($mfSystem, $mfMemberID, "heads"), @@ -254,7 +255,7 @@ function getMemberBannerData(string $id, string $system, bool $french = false) { sort($mfMember); $mfMember = $mfMember[0]; - $caretakers[] = [ + if (!($mfSystem === $app["other"]["id"] && !$isLoggedIn && !$isLowerLoggedIn)) $caretakers[] = [ "id" => $marefriend, "link" => "/" . ($mfMember["name"]), "icon" => getAsset($mfSystem, $mfMemberID, "heads"), |