aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rw-r--r--phpBB/includes/acp/acp_ban.php17
-rw-r--r--phpBB/language/en/acp/ban.php6
3 files changed, 20 insertions, 4 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 13dd42cf8f..a2d730e6a6 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -145,6 +145,7 @@
<li>[Fix] Color bbcode now supports three-digit hex notation. (Bug #39965 - Patch by m0rpha)</li>
<li>[Fix] Search by authorname does not display posts of guests and deleted users (Bug #36565 - Patch by nickvergessen)</li>
<li>[Fix] Further word censor fix to work with UTF8 correctly. (Patch by rxu)</li>
+ <li>[Fix] View end of ban in MCP and ACP when user is banned by duration (Bug #47815 - Patch by Pyramide)</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
<li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li>
<li>[Change] Template engine now permits to a limited extent variable includes.</li>
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'];
diff --git a/phpBB/language/en/acp/ban.php b/phpBB/language/en/acp/ban.php
index 5fcbb1fa69..099834d1e4 100644
--- a/phpBB/language/en/acp/ban.php
+++ b/phpBB/language/en/acp/ban.php
@@ -48,6 +48,8 @@ $lang = array_merge($lang, array(
'BAN_REASON' => 'Reason for ban',
'BAN_GIVE_REASON' => 'Reason shown to the banned',
'BAN_UPDATE_SUCCESSFUL' => 'The banlist has been updated successfully.',
+ 'BANNED_UNTIL_DATE' => 'until %s', // Example: "until Mon 13.Jul.2009, 14:44"
+ 'BANNED_UNTIL_DURATION' => '%1$s (until %2$s)', // Example: "7 days (until Tue 14.Jul.2009, 14:44)"
'EMAIL_BAN' => 'Ban one or more e-mail addresses',
'EMAIL_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered e-mail address from all current bans.',
@@ -67,7 +69,7 @@ $lang = array_merge($lang, array(
'LENGTH_BAN_INVALID' => 'The date has to be formatted <kbd>YYYY-MM-DD</kbd>.',
'PERMANENT' => 'Permanent',
-
+
'UNTIL' => 'Until',
'USER_BAN' => 'Ban one or more usernames',
'USER_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered users from all current bans.',
@@ -75,8 +77,6 @@ $lang = array_merge($lang, array(
'USER_NO_BANNED' => 'No banned usernames',
'USER_UNBAN' => 'Un-ban or un-exclude usernames',
'USER_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded users are emphasised.',
-
-
));
?> \ No newline at end of file