mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
banned_by is player_id. type = 2 is namelock in tfs 0.3
This commit is contained in:
parent
cfbcabbfdb
commit
3dd493b790
@ -50,7 +50,8 @@ if(!$bansQuery->rowCount())
|
|||||||
|
|
||||||
$nextPage = false;
|
$nextPage = false;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$bans = $bansQuery->fetchAll();
|
$bans = $bansQuery->fetchAll(PDO::FETCH_ASSOC);
|
||||||
|
|
||||||
foreach ($bans as $id => &$ban)
|
foreach ($bans as $id => &$ban)
|
||||||
{
|
{
|
||||||
if(++$i > $configBansPerPage)
|
if(++$i > $configBansPerPage)
|
||||||
@ -69,11 +70,22 @@ foreach ($bans as $id => &$ban)
|
|||||||
$accountId = $ban['account_id'];
|
$accountId = $ban['account_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$ban['player'] = getPlayerLink(getPlayerNameByAccount($accountId));
|
$playerName = 'Unknown';
|
||||||
|
|
||||||
if ($configBans['hasType']) {
|
if ($configBans['hasType']) {
|
||||||
$ban['type'] = getBanType($ban['type']);
|
$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';
|
$expiresColumn = 'expires_at';
|
||||||
if ($db->hasColumn('bans', 'expires')) {
|
if ($db->hasColumn('bans', 'expires')) {
|
||||||
@ -104,7 +116,7 @@ foreach ($bans as $id => &$ban)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$addedBy = getPlayerLink(getPlayerNameByAccount($ban['banned_by']));
|
$addedBy = getPlayerLink(getPlayerNameById($ban['banned_by']));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($db->hasColumn('bans', 'added')) {
|
if ($db->hasColumn('bans', 'added')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user