Fix Admin\Bans page
This commit is contained in:
parent
c77aae8af2
commit
212208c430
2 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ class GetList extends Method
|
|||
$vars = [
|
||||
':ids' => $ids,
|
||||
];
|
||||
$query = 'SELECT b.id, b.username, b.ip, b.email, b.message, b.expire, u.id AS id_creator, u.username AS name_creator
|
||||
$query = 'SELECT b.id, b.username, b.ip, b.email, b.message, b.expire, b.ban_creator AS id_creator, u.username AS name_creator
|
||||
FROM ::bans AS b
|
||||
LEFT JOIN ::users AS u ON u.id=b.ban_creator
|
||||
WHERE b.id IN (?ai:ids)';
|
||||
|
@ -33,7 +33,7 @@ class GetList extends Method
|
|||
while ($row = $stmt->fetch()) {
|
||||
if (null === $row['name_creator']) {
|
||||
$row['name_creator'] = 'User #' . $row['id_creator'];
|
||||
$row['id_creator'] = 1;
|
||||
$row['id_creator'] = 0;
|
||||
}
|
||||
|
||||
$list[$row['id']] = $row;
|
||||
|
|
|
@ -478,7 +478,7 @@ class Bans extends Admin
|
|||
];
|
||||
$fields["l{$number}-creator"] = [
|
||||
'class' => ['result', 'creator'],
|
||||
'type' => 1 === $this->user->g_view_users && $ban['id_creator'] > 1 ? 'link' : 'str',
|
||||
'type' => 1 === $this->user->g_view_users && $ban['id_creator'] > 0 ? 'link' : 'str',
|
||||
'caption' => 'Results banned by head',
|
||||
'value' => $ban['name_creator'],
|
||||
'href' => $this->c->Router->link(
|
||||
|
|
Loading…
Add table
Reference in a new issue