summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/components/details.inc2
-rw-r--r--includes/fragments/metadata.inc2
-rw-r--r--includes/pages.json2
-rw-r--r--pages/api/emergency-real.php4
-rw-r--r--pages/api/emergency.php4
-rw-r--r--pages/profiles.inc4
6 files changed, 10 insertions, 8 deletions
diff --git a/includes/components/details.inc b/includes/components/details.inc
index e50daf6..77790de 100644
--- a/includes/components/details.inc
+++ b/includes/components/details.inc
@@ -19,7 +19,7 @@
</div>
<div>
<b>Age:</b><span class="member-small-separator"><br></span>
- <?php if (!isset($metadata["birth"]["year"]) || $metadata["birth"]["age"] > 0): ?>
+ <?php if (!isset($metadata["birth"]["year"]) || $metadata["birth"]["age"] > 0 || $metadata["birth"]["age"] === -1): ?>
<?php if ($metadata["birth"]["age"] === -1): $age = abs(log(0)); // => INF ?>
<?= "<span data-bs-toggle='tooltip' title='This pony never ages and doesn&apos;t have a defined age, making this pony pretty much eternal.'>Eternal</span>" ?>
<?php elseif ($metadata["birth"]["age"] <= 0): ?>
diff --git a/includes/fragments/metadata.inc b/includes/fragments/metadata.inc
index 031fd19..4d13bb7 100644
--- a/includes/fragments/metadata.inc
+++ b/includes/fragments/metadata.inc
@@ -41,7 +41,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
<b>Species</b><br>
<div style="display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 10px;">
<select class="tooltip-nohelp form-select" style='display:inline-block;filter:invert(1) hue-rotate(180deg);background-image:url("data:image/svg+xml,%3csvg xmlns=&apos;http://www.w3.org/2000/svg&apos; viewBox=&apos;0 0 16 16&apos;%3e%3cpath fill=&apos;none&apos; stroke=&apos;%23000000&apos; stroke-linecap=&apos;round&apos; stroke-linejoin=&apos;round&apos; stroke-width=&apos;2&apos; d=&apos;M2 5l6 6 6-6&apos;/%3e%3c/svg%3e");' name="species[0]">
- <option <?= !isset($metadata["species"][0]) || $metadata["species"][0] === "" ? "selected" : "" ?> value="" disabled>None</option>
+ <option <?= !isset($metadata["species"][0]) || $metadata["species"][0] === "" ? "selected" : "" ?> value="">None</option>
<option <?= $metadata["species"][0] === "earth" ? "selected" : "" ?> value="earth">Earth pony</option>
<option <?= $metadata["species"][0] === "unicorn" ? "selected" : "" ?> value="unicorn">Unicorn</option>
<option <?= $metadata["species"][0] === "pegasus" ? "selected" : "" ?> value="pegasus">Pegasus</option>
diff --git a/includes/pages.json b/includes/pages.json
index f5e665f..aad0ed2 100644
--- a/includes/pages.json
+++ b/includes/pages.json
@@ -136,7 +136,7 @@
},
"short": null,
"admin": true,
- "limited": false,
+ "limited": true,
"rail": true
},
"fronting": {
diff --git a/pages/api/emergency-real.php b/pages/api/emergency-real.php
index 05bbaf7..d788ca8 100644
--- a/pages/api/emergency-real.php
+++ b/pages/api/emergency-real.php
@@ -1,7 +1,7 @@
<?php
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn;
-if (!$isLoggedIn) header("Location: /-/login") and die();
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
+if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die();
global $_PROFILE;
$ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"];
diff --git a/pages/api/emergency.php b/pages/api/emergency.php
index ff79834..9024197 100644
--- a/pages/api/emergency.php
+++ b/pages/api/emergency.php
@@ -1,7 +1,7 @@
<?php
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn;
-if (!$isLoggedIn) header("Location: /-/login") and die();
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $isLowerLoggedIn;
+if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die();
global $_PROFILE;
$ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"];
diff --git a/pages/profiles.inc b/pages/profiles.inc
index 41e5222..8440b5f 100644
--- a/pages/profiles.inc
+++ b/pages/profiles.inc
@@ -65,7 +65,9 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/util/profiles.inc';
<div style="margin: -10px -10px -10px 10px;background: linear-gradient(90deg, rgba(255, 255, 255, .1) 0%, rgba(255, 255, 255, .1) <?= round($member["_score"]["progress"] * 100) ?>%, transparent <?= round($member["_score"]["progress"] * 100) ?>.000001%);border-top-right-radius: 10px;border-bottom-right-radius: 10px;display: flex;align-items: center;">
<div style="margin-left: 10px; width: 100%;">
- <?php if (count($member["_score"]["actions"]) < 3): ?>
+ <?php if (count($member["_score"]["actions"]) === 0): ?>
+ Complete profile
+ <?php elseif (count($member["_score"]["actions"]) < 3): ?>
Add <?= implode(" and ", $member["_score"]["actions"]) ?> to get to 100%
<?php else: ?>
<?= round($member["_score"]["progress"] * 100) ?>% complete