mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 17:59:22 +02:00
Add load time into items & weapons loading admin page
This commit is contained in:
parent
6a89b12258
commit
6a81794bba
@ -15,15 +15,21 @@ require LIBS . 'weapons.php';
|
|||||||
|
|
||||||
$twig->display('admin.items.html.twig');
|
$twig->display('admin.items.html.twig');
|
||||||
|
|
||||||
$reload = isset($_REQUEST['reload']) && (int)$_REQUEST['reload'] == 1;
|
$reload = isset($_REQUEST['reload']) && (int)$_REQUEST['reload'] === 1;
|
||||||
if ($reload) {
|
if ($reload) {
|
||||||
if (Items::loadFromXML(true))
|
$items_start_time = microtime(true);
|
||||||
success('Successfully loaded items.');
|
if (Items::loadFromXML(true)) {
|
||||||
else
|
success('Successfully loaded items (in ' . round(microtime(true) - $items_start_time, 4) . ' seconds).');
|
||||||
|
}
|
||||||
|
else {
|
||||||
error(Items::getError());
|
error(Items::getError());
|
||||||
|
}
|
||||||
|
|
||||||
if (Weapons::loadFromXML(true))
|
$weapons_start_time = microtime(true);
|
||||||
success('Successfully loaded weapons.');
|
if (Weapons::loadFromXML(true)) {
|
||||||
else
|
success('Successfully loaded weapons (in ' . round(microtime(true) - $weapons_start_time, 4) . ' seconds).');
|
||||||
|
}
|
||||||
|
else {
|
||||||
error(Weapons::getError());
|
error(Weapons::getError());
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user