diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-22 00:19:20 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-22 00:19:20 +0200 |
commit | 4353c3d94a4a24dda5ced59c0e5dcd0b3626f245 (patch) | |
tree | 8dcb580c6dfe2e31a5b3cf4030a4b9daf1c64dd8 | |
parent | e8b99eb53969a824d4202078f75ea038e376688b (diff) | |
download | webring-4353c3d94a4a24dda5ced59c0e5dcd0b3626f245.tar.gz webring-4353c3d94a4a24dda5ced59c0e5dcd0b3626f245.tar.bz2 webring-4353c3d94a4a24dda5ced59c0e5dcd0b3626f245.zip |
Make stuff roll
-rw-r--r-- | FtechWebring.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/FtechWebring.php b/FtechWebring.php index cca1a79..bd99318 100644 --- a/FtechWebring.php +++ b/FtechWebring.php @@ -85,10 +85,14 @@ if ($raw !== false) { if (isset($sites[$thisSite - 1])) { // We check if there's a previous site in the list $previous = $sites[$thisSite - 1]["url"]; + } else { + $previous = $sites[count($sites) - 1]["url"]; // If this is the first site, roll out to the last one } if (isset($sites[$thisSite + 1])) { // We check if there's a next site in the list $next = $sites[$thisSite + 1]["url"]; + } else { + $next = $sites[0]["url"]; // If this is the last site, roll out to the first one } echo(" |