summaryrefslogtreecommitdiff
path: root/includes/system/subsystem.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-08-21 17:31:56 +0200
committerMinteck <contact@minteck.org>2022-08-21 17:31:56 +0200
commita2df9a69dcc14cb70118cda2ded499055e7ee358 (patch)
tree6dd283e4e9452d38bce81ddaaae49b5335755842 /includes/system/subsystem.php
parent84dd0735820b16b60f600284d35183d76547a71f (diff)
downloadpluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.gz
pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.tar.bz2
pluralconnect-a2df9a69dcc14cb70118cda2ded499055e7ee358.zip
m. update
Diffstat (limited to 'includes/system/subsystem.php')
-rw-r--r--includes/system/subsystem.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/system/subsystem.php b/includes/system/subsystem.php
index 5d28cba..14d1b2a 100644
--- a/includes/system/subsystem.php
+++ b/includes/system/subsystem.php
@@ -1,5 +1,7 @@
<?php global $system; global $systemCommonName; global $parts; global $systemID;
+if (str_ends_with($_GET['_'], "/subsystem")) header("Location: /?error=Invalid subsystem ID") and die();
+
$members = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-members.json"), true);
$subsystemID = $parts[3];
@@ -97,7 +99,7 @@ function timeAgo($time): string {
$difference = round($difference);
$period = $periods[$j] . ($difference >1 ? "s" :'');
- return "{$difference} {$period} {$tense} ";
+ return "{$difference} {$period} {$tense}";
}
if (getSubsystemByID($subsystemID) === null) header("Location: /?error=Invalid subsystem ID") and die();
@@ -114,7 +116,7 @@ $title = $subsystemData["name"] . " ยท " . $systemCommonName; require_once $_SER
<div id="page-content">
<?php global $isLoggedIn; if ($isLoggedIn): ?>
- <small style="opacity:.5;display:block;">(<a href="/edit/<?= $system ?>/<?= $subsystemID ?>">edit</a>)</small>
+ <small style="opacity:.5;display:block;">(<a href="/-/edit/<?= $system ?>/<?= $subsystemID ?>">edit</a>)</small>
<?php endif; ?>
<?= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID-subsystem-$subsystemID.html") ?>
</div>