mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Merge branch '0.9' into develop
This commit is contained in:
commit
6c8961638e
@ -272,7 +272,7 @@ else if (isset($_REQUEST['search'])) {
|
||||
</li>
|
||||
<?php endif;
|
||||
|
||||
if ($db->hasTable('store_history')) : ?>
|
||||
if ($db->hasTable('store_history') && $db->hasColumn('store_history', 'time')) : ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="accounts-store-tab" data-toggle="pill" href="#accounts-store">Store History</a>
|
||||
</li>
|
||||
@ -523,7 +523,7 @@ else if (isset($_REQUEST['search'])) {
|
||||
} ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
if ($db->hasTable('store_history')) { ?>
|
||||
if ($db->hasTable('store_history') && $db->hasColumn('store_history', 'time')) { ?>
|
||||
<div class="tab-pane fade" id="accounts-store">
|
||||
<?php $store_history = $db->query('SELECT * FROM `store_history` WHERE `account_id` = "' . $account->getId() . '" ORDER BY `time` DESC')->fetchAll(); ?>
|
||||
<table class="table table-striped table-condensed table-responsive d-md-table">
|
||||
|
@ -50,7 +50,8 @@ if(!$bansQuery->rowCount())
|
||||
|
||||
$nextPage = false;
|
||||
$i = 0;
|
||||
$bans = $bansQuery->fetchAll();
|
||||
$bans = $bansQuery->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
foreach ($bans as $id => &$ban)
|
||||
{
|
||||
if(++$i > $configBansPerPage)
|
||||
@ -69,11 +70,22 @@ foreach ($bans as $id => &$ban)
|
||||
$accountId = $ban['account_id'];
|
||||
}
|
||||
|
||||
$ban['player'] = getPlayerLink(getPlayerNameByAccount($accountId));
|
||||
|
||||
$playerName = 'Unknown';
|
||||
if ($configBans['hasType']) {
|
||||
$ban['type'] = getBanType($ban['type']);
|
||||
|
||||
if ($ban['type'] == 2) { // namelock
|
||||
$playerName = getPlayerNameById($accountId);
|
||||
}
|
||||
else {
|
||||
$playerName = getPlayerNameByAccount($accountId);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$playerName = getPlayerNameByAccount($accountId);
|
||||
}
|
||||
|
||||
$ban['player'] = getPlayerLink($playerName);
|
||||
|
||||
$expiresColumn = 'expires_at';
|
||||
if ($db->hasColumn('bans', 'expires')) {
|
||||
@ -104,7 +116,7 @@ foreach ($bans as $id => &$ban)
|
||||
}
|
||||
}
|
||||
else {
|
||||
$addedBy = getPlayerLink(getPlayerNameByAccount($ban['banned_by']));
|
||||
$addedBy = getPlayerLink(getPlayerNameById($ban['banned_by']));
|
||||
}
|
||||
|
||||
if ($db->hasColumn('bans', 'added')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user