spells page: Fixed errors when spells is not installed by admin.

This commit is contained in:
Znote 2017-02-15 18:27:14 +01:00
parent bc2a6e2c01
commit 96802cb348

View File

@ -94,6 +94,7 @@ if (user_logged_in() && is_admin($user_data)) {
}
// End loading spell list
if ($spells) {
// Preparing data
$configVoc = $config['vocations'];
$types = array_keys($spells);
@ -236,6 +237,13 @@ if ($getVoc !== 'all') {
</table>
<a href="#spells">Jump to top</a>
<?php
} else {
?>
<h1>Spells</h1>
<p>Spells have currently not been loaded into the website by the server admin.</p>
<?php
}
/* Debug tests
foreach ($spells as $type => $spells) {
data_dump($spells, false, "Type: $type");