From cc2a438199b02c78e5b2e2b71de8e56f6617eae9 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 3 Jun 2023 14:10:08 +0200 Subject: Updated 15 files (automated) --- app.php | 6 ++++-- error.php | 8 +++++--- includes/components/navigation.inc | 8 -------- includes/components/pleasure.inc | 10 +++++----- includes/flags.json | 2 +- includes/fragments/member.inc | 2 +- includes/fragments/metadata.inc | 20 ++++++++++---------- includes/fragments/system.inc | 2 +- includes/util/banner.inc | 4 ++-- pages/api/disconnect.php | 7 +++++-- pages/byfront.inc | 4 ++-- pages/computers.inc | 14 +++++++++----- pages/docs.inc | 6 +++--- pages/sessions.inc | 6 ++++-- pages/toys.inc | 25 ------------------------- 15 files changed, 52 insertions(+), 72 deletions(-) diff --git a/app.php b/app.php index 8033207..6506a4a 100644 --- a/app.php +++ b/app.php @@ -2,8 +2,10 @@ ob_start(); -require_once $_SERVER['DOCUMENT_ROOT'] . "/error.php"; -set_error_handler("ch_error"); +if (!str_starts_with($_SERVER['REQUEST_URI'], "/api")) { + require_once $_SERVER['DOCUMENT_ROOT'] . "/error.php"; + set_error_handler("ch_error"); +} $start = microtime(true); $GLOBALS["ColdHazeStart"] = microtime(true); diff --git a/error.php b/error.php index 992197e..5b65ab3 100644 --- a/error.php +++ b/error.php @@ -1,5 +1,9 @@ + if ($level === E_USER_DEPRECATED || $level === E_DEPRECATED) return false; + + ob_end_clean(); + + ?> @@ -68,10 +72,8 @@ if ($level === E_COMPILE_WARNING) echo("E_ALL"); if ($level === E_CORE_ERROR) echo("E_ALL"); if ($level === E_CORE_WARNING) echo("E_ALL"); - if ($level === E_DEPRECATED) echo("E_DEPRECATED"); if ($level === E_PARSE) echo("E_PARSE"); if ($level === E_RECOVERABLE_ERROR) echo("E_RECOVERABLE_ERROR"); - if ($level === E_USER_DEPRECATED) echo("E_USER_DEPRECATED"); ?>] diff --git a/includes/components/navigation.inc b/includes/components/navigation.inc index 9a777ce..f08fca2 100644 --- a/includes/components/navigation.inc +++ b/includes/components/navigation.inc @@ -157,14 +157,6 @@ $navigation_admin = [ "stepped" => null, "private" => false ], - [ - "name" => $pages["rules"]["name"][$lang["_name"]], - "icon" => "/assets/icons/rules.svg", - "invert" => true, - "link" => "/-/rules", - "stepped" => null, - "private" => true - ], [ "name" => $pages["toys"]["name"][$lang["_name"]], "icon" => "/assets/icons/toys.svg", diff --git a/includes/components/pleasure.inc b/includes/components/pleasure.inc index 40bf7fd..0939228 100644 --- a/includes/components/pleasure.inc +++ b/includes/components/pleasure.inc @@ -28,7 +28,7 @@ ?> However, if you wish, any of the ponies mentioned on this page can take control of the body for the amount of time required for sex. - +
:

:

:

:

diff --git a/includes/flags.json b/includes/flags.json index 9d21e1f..d11fd54 100644 --- a/includes/flags.json +++ b/includes/flags.json @@ -7,7 +7,7 @@ "protector": "!!Protector", "leader": "Leader", - "fictive": "!!Fictive (Equestria)", + "fictive": "!!Equestrian", "fictive2": "Fictive (Celeste)", "sexual_features": "Enable sexual features (for ponies below 16)", "sexually_active": "!!Preemptive sexual consent", diff --git a/includes/fragments/member.inc b/includes/fragments/member.inc index 1db0dd2..476b748 100644 --- a/includes/fragments/member.inc +++ b/includes/fragments/member.inc @@ -13,7 +13,7 @@ if ($memberData["name"] === "fusion") { if ($memberData["name"] !== "unknown" && $memberData["name"] !== "fusion") { $metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $memberID . ".json"), true)); - if ($metadata["private"] && !$isLoggedIn && !$isLowerLoggedIn) { + if (isset($metadata["private"]) && $metadata["private"] && !$isLoggedIn && !$isLowerLoggedIn) { peh_error("Page not found: " . strip_tags($member), 404); } } diff --git a/includes/fragments/metadata.inc b/includes/fragments/metadata.inc index cd022df..38317ce 100644 --- a/includes/fragments/metadata.inc +++ b/includes/fragments/metadata.inc @@ -95,14 +95,14 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
@@ -292,7 +292,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member
"> - + + + @@ -331,7 +331,7 @@ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $member class="form-check-input" type="checkbox" name="flags[]">
- $name2): if (!is_array($name2) && !is_null($name2)): if (($systemID === $app["other"]["id"] && str_starts_with($name2, "!!")) || ($systemID !== $app["other"]["id"] && !str_starts_with($name2, "#"))): ?> + $name2): if (!is_array($name2) && !is_null($name2)): if (($systemID === $app["other"]["id"] && str_starts_with($name2, "!!")) || ($systemID !== $app["other"]["id"] && !str_starts_with($name2, "#"))): ?>