show error if me= is set and incorrect
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
9dafe487bf
commit
399508d366
|
@ -6,7 +6,11 @@ $users = array_map(function ($f) { return basename(dirname($f)); }, glob("/home/
|
|||
if ($action !== "index") {
|
||||
// handle webring redirects
|
||||
$me = $_GET["me"] ?? "";
|
||||
$i = array_search($me, $users) ?? 0;
|
||||
if (!in_array($me, $users) && $action != "random") {
|
||||
header("Location: https://tilde.team/ring/?error");
|
||||
die();
|
||||
}
|
||||
$i = array_search($me, $users);
|
||||
|
||||
switch ($action) {
|
||||
case "random":
|
||||
|
@ -50,6 +54,9 @@ else {
|
|||
include __DIR__ . '/../header.php';
|
||||
?>
|
||||
<h1>how to join the webring</h1>
|
||||
<?php if (isset($_GET["error"])): ?>
|
||||
<div class="alert alert-danger" role="alert"><strong>ERROR</strong> please be sure that me=USERNAME is set to your user and have created a <code>~/.ring</code> file.</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<p>this webring can be joined by any user on tilde.team.</p>
|
||||
<p>first, add the following links to your page, replacing USERNAME by your username (no ~):</p>
|
||||
|
|
Loading…
Reference in New Issue