aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_ban.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/acp/acp_ban.php')
-rw-r--r--phpBB/includes/acp/acp_ban.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php
index 77fb44dda9..542ed47f3b 100644
--- a/phpBB/includes/acp/acp_ban.php
+++ b/phpBB/includes/acp/acp_ban.php
@@ -181,7 +181,22 @@ class acp_ban
$banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
$time_length = ($row['ban_end']) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0;
- $ban_length[$row['ban_id']] = (isset($ban_end_text[$time_length])) ? $ban_end_text[$time_length] : $user->lang['UNTIL'] . ' -> ' . $user->format_date($row['ban_end']);
+
+ if ($time_length == 0)
+ {
+ // Banned permanently
+ $ban_length[$row['ban_id']] = $user->lang['PERMANENT'];
+ }
+ else if (isset($ban_end_text[$time_length]))
+ {
+ // Banned for a given duration
+ $ban_length[$row['ban_id']] = sprintf($user->lang['BANNED_UNTIL_DURATION'], $ban_end_text[$time_length], $user->format_date($row['ban_end'], false, true));
+ }
+ else
+ {
+ // Banned until given date
+ $ban_length[$row['ban_id']] = sprintf($user->lang['BANNED_UNTIL_DATE'], $user->format_date($row['ban_end'], false, true));
+ }
$ban_reasons[$row['ban_id']] = $row['ban_reason'];
$ban_give_reasons[$row['ban_id']] = $row['ban_give_reason'];