1
0
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:
Marc Alexander
2023-08-06 13:59:23 +02:00
parent d7389809aa
commit 54bb32bba5
5 changed files with 78 additions and 4 deletions

View File

@@ -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;

View File

@@ -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,

View File

@@ -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);