diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 18de2a0d2c..5799137f5f 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -120,9 +120,9 @@ $lang = array_merge($lang, array( 'BBCODE_GUIDE' => 'BBCode guide', 'BCC' => 'BCC', 'BIRTHDAYS' => 'Birthdays', - 'BOARD_BAN_PERM' => 'You have been permanently banned from this board.

Please contact the %2$sBoard Administrator%3$s for more information.', + 'BOARD_BAN_PERM' => 'You have been permanently banned from this board.

Please contact the %2$sBoard Administrator%3$s for more information.', 'BOARD_BAN_REASON' => 'Reason given for ban: %s', - 'BOARD_BAN_TIME' => 'You have been banned from this board until %1$s.

Please contact the %2$sBoard Administrator%3$s for more information.', + 'BOARD_BAN_TIME' => 'You have been banned from this board until %1$s.

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.', diff --git a/phpBB/phpbb/ban/manager.php b/phpBB/phpbb/ban/manager.php index 0acfd1e019..7455f7635c 100644 --- a/phpBB/phpbb/ban/manager.php +++ b/phpBB/phpbb/ban/manager.php @@ -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, '', ''); - $message .= $ban_row['reason'] ? '

' . $this->language->lang('BOARD_BAN_REASON', $ban_row['reason']) : ''; + $message .= !empty($ban_row['reason']) ? '

' . $this->language->lang('BOARD_BAN_REASON', $ban_row['reason']) : ''; $message .= '

' . $this->language->lang('BAN_TRIGGERED_BY_' . strtoupper($ban_triggered_by)) . ''; return $message; diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index bdb0ad58a5..4c2471ab92 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -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();