* PLEASE RELOAD YOUR ITEMS AND MONSTERS AFTER THIS UPDATE

* save monster loot in database in json format instead loading it every time from xml file
* store monster voices and immunities in json format
* removed useless monsters.gfx_name field from database
* convert item name to item id in loot in monsters.xml loader
* after changing template you will be redirected to latest viewed page
* display gallery add image form only on main gallery page
* fixed displaying monster loot when item.name in loot is used instead of item.id
* (intern) added new function getItemNameById($id)
* (intern) renamed database field monsters.hide_creature to hidden
This commit is contained in:
slawkens
2017-10-20 15:04:11 +02:00
parent d4900eac84
commit c2678aa91f
11 changed files with 157 additions and 129 deletions

View File

@@ -56,14 +56,16 @@ if($canEdit) {
echo $twig->render('error_box.html.twig', array('errors' => $errors));
}
echo $twig->render('gallery.form.html.twig', array(
'link' => getLink('gallery/' . ($action == 'edit' ? 'edit' : 'add')),
'action' => $action,
'id' => isset($id) ? $id : null,
'comment' => isset($comment) ? $comment : null,
'image' => isset($image) ? $image : null,
'author' => isset($author) ? $author : null
));
if(!isset($_GET['image'])) {
echo $twig->render('gallery.form.html.twig', array(
'link' => getLink('gallery/' . ($action == 'edit' ? 'edit' : 'add')),
'action' => $action,
'id' => isset($id) ? $id : null,
'comment' => isset($comment) ? $comment : null,
'image' => isset($image) ? $image : null,
'author' => isset($author) ? $author : null
));
}
}
else
echo 'You cannot edit/add gallery items as it seems your PHP installation doesnt have GD support enabled. Visit <a href="http://be2.php.net/manual/en/image.installation.php">PHP Manual</a> for more info.';