mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/9687] Improve labeling in acp for user bans
PHPBB3-9687
This commit is contained in:
@@ -3168,7 +3168,7 @@ function display_ban_options($mode)
|
||||
{
|
||||
$banned_options[] = [
|
||||
'value' => $ban_row['ban_id'],
|
||||
'label' => $ban_row['ban_item'],
|
||||
'label' => $ban_row['label'] ?? $ban_row['ban_item'],
|
||||
];
|
||||
|
||||
$time_length = ($ban_row['ban_end']) ? ($ban_row['ban_end'] - $ban_row['ban_start']) / 60 : 0;
|
||||
|
@@ -126,6 +126,7 @@ class manager
|
||||
$insert_array[] = [
|
||||
'ban_mode' => $mode,
|
||||
'ban_item' => $ban_item,
|
||||
'ban_userid' => $mode === 'user' ? $ban_item : 0,
|
||||
'ban_start' => $start->getTimestamp(),
|
||||
'ban_end' => $end->getTimestamp(),
|
||||
'ban_reason' => $reason,
|
||||
|
@@ -84,6 +84,7 @@ class user extends base
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$row['label'] = $row['username'];
|
||||
$ban_options[] = $row;
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
Reference in New Issue
Block a user