Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions resources/lib/UnityHTTPD.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ public static function gracefulDie(
}
// text may not be shown in the webpage in an obvious way, so make a popup
self::alert(implode(" -- ", [$title, ...$body_paragraphs]));
echo sprintf(
"<h1>%s</h1>\n%s\n",
htmlspecialchars($title),
implode("\n<br>\n", $body_paragraphs),
);
printf("<h1>%s</h1>\n", htmlspecialchars($title));
foreach ($body_paragraphs as $p) {
printf("%s\n<br>\n", htmlspecialchars($p));
}
printf("<a href='%s'>Go to Home</a>\n<br>\n", getRelativeURL("/index.php"));
// display_errors should not be enabled in production
if (
!is_null($error) &&
Expand Down
2 changes: 1 addition & 1 deletion webroot/panel/pi.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$group = $USER->getPIGroup();
$user_is_owner = true;
if (!$group->exists()) {
UnityHTTPD::badRequest("not a PI", "You are not a PI.");
UnityHTTPD::forbidden("not a PI", "You are not a PI.");
}
}

Expand Down
Loading