mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/9687] Fix ban message for banned users
PHPBB3-9687
This commit is contained in:
parent
54bb32bba5
commit
e54d54488c
3 changed files with 14 additions and 6 deletions
|
@ -120,9 +120,9 @@ $lang = array_merge($lang, array(
|
|||
'BBCODE_GUIDE' => 'BBCode guide',
|
||||
'BCC' => 'BCC',
|
||||
'BIRTHDAYS' => 'Birthdays',
|
||||
'BOARD_BAN_PERM' => 'You have been <strong>permanently</strong> banned from this board.<br /><br />Please contact the %2$sBoard Administrator%3$s for more information.',
|
||||
'BOARD_BAN_PERM' => 'You have been <strong>permanently</strong> banned from this board.<br><br>Please contact the %2$sBoard Administrator%3$s for more information.',
|
||||
'BOARD_BAN_REASON' => 'Reason given for ban: <strong>%s</strong>',
|
||||
'BOARD_BAN_TIME' => 'You have been banned from this board until <strong>%1$s</strong>.<br /><br />Please contact the %2$sBoard Administrator%3$s for more information.',
|
||||
'BOARD_BAN_TIME' => 'You have been banned from this board until <strong>%1$s</strong>.<br><br>Please contact the %2$sBoard Administrator%3$s for more information.',
|
||||
'BOARD_DISABLE' => 'Sorry but this board is currently unavailable.',
|
||||
'BOARD_DISABLED' => 'This board is currently disabled.',
|
||||
'BOARD_UNAVAILABLE' => 'Sorry but the board is temporarily unavailable, please try again in a few minutes.',
|
||||
|
|
|
@ -554,11 +554,19 @@ class manager
|
|||
*/
|
||||
public function get_ban_message(array $ban_row, string $ban_triggered_by, string $contact_link): string
|
||||
{
|
||||
$till_date = ($ban_row && $ban_row['end'] > 0) ? $this->user->format_date($ban_row['end']) : '';
|
||||
if ($ban_row['end'] > 0)
|
||||
{
|
||||
$till_date = $this->user->format_date($ban_row['end']);
|
||||
$ban_type = 'BOARD_BAN_TIME';
|
||||
}
|
||||
else
|
||||
{
|
||||
$till_date = '';
|
||||
$ban_type = 'BOARD_BAN_PERM';
|
||||
}
|
||||
|
||||
$ban_type = $ban_row['ban_end'] ? 'BOARD_BAN_TIME' : 'BOARD_BAN_PERM';
|
||||
$message = $this->language->lang($ban_type, $till_date, '<a href="' . $contact_link . '">', '</a>');
|
||||
$message .= $ban_row['reason'] ? '<br><br>' . $this->language->lang('BOARD_BAN_REASON', $ban_row['reason']) : '';
|
||||
$message .= !empty($ban_row['reason']) ? '<br><br>' . $this->language->lang('BOARD_BAN_REASON', $ban_row['reason']) : '';
|
||||
$message .= '<br><br><em>' . $this->language->lang('BAN_TRIGGERED_BY_' . strtoupper($ban_triggered_by)) . '</em>';
|
||||
|
||||
return $message;
|
||||
|
|
|
@ -1170,7 +1170,7 @@ class session
|
|||
|
||||
if ($banned && !$return)
|
||||
{
|
||||
global $phpEx;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
// Initiate environment ... since it won't be set at this stage
|
||||
$this->setup();
|
||||
|
|
Loading…
Add table
Reference in a new issue