mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 09:49:22 +02:00

* this requires loaded items - go to admin panel and select Items menu, then reload * added items.xml loader class and weapons.xml loader class * load also runes into spells table * (internal) changed spells.vocations database field to store json data instead of comma separated * (internal) renamed existing Items class to Items_Images
31 lines
672 B
PHP
31 lines
672 B
PHP
<?php
|
|
/**
|
|
* Load items.xml
|
|
*
|
|
* @package MyAAC
|
|
* @author Slawkens <slawkens@gmail.com>
|
|
* @copyright 2017 MyAAC
|
|
* @version 0.6.1
|
|
* @link http://my-aac.org
|
|
*/
|
|
defined('MYAAC') or die('Direct access not allowed!');
|
|
$title = 'Load items.xml';
|
|
|
|
require(LIBS . 'items.php');
|
|
require(LIBS . 'weapons.php');
|
|
|
|
echo $twig->render('admin.items.html.twig');
|
|
|
|
$reload = isset($_REQUEST['reload']) && (int)$_REQUEST['reload'] == 1;
|
|
if($reload) {
|
|
if(Items::loadFromXML(true))
|
|
success('Successfully loaded items.');
|
|
else
|
|
error(Items::getError());
|
|
|
|
if(Weapons::loadFromXML(true))
|
|
success('Successfully loaded weapons.');
|
|
else
|
|
error(Weapons::getError());
|
|
|
|
} |