1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-25 04:24:31 +02:00

Fix bug #47815 - View end of ban in MCP and ACP when user is banned by duration - Patch by Pyramide

Authorised by: AcydBurn


git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9727 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Joas Schilling
2009-07-07 13:33:53 +00:00
parent eb4eee77ac
commit fd667f9932
3 changed files with 20 additions and 4 deletions

View File

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

View File

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

View File

@ -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.',
));
?>