mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/9687] Properly support banning and fix display of ban info
PHPBB3-9687
This commit is contained in:
parent
43b35e1560
commit
026d66dab2
2 changed files with 10 additions and 3 deletions
|
@ -56,7 +56,6 @@ class acp_ban
|
||||||
$ban = $request->variable('ban', '', true);
|
$ban = $request->variable('ban', '', true);
|
||||||
$ban_length = $request->variable('banlength', 0);
|
$ban_length = $request->variable('banlength', 0);
|
||||||
$ban_length_other = $request->variable('banlengthother', '');
|
$ban_length_other = $request->variable('banlengthother', '');
|
||||||
$ban_exclude = $request->variable('banexclude', 0);
|
|
||||||
$ban_reason = $request->variable('banreason', '', true);
|
$ban_reason = $request->variable('banreason', '', true);
|
||||||
$ban_give_reason = $request->variable('bangivereason', '', true);
|
$ban_give_reason = $request->variable('bangivereason', '', true);
|
||||||
|
|
||||||
|
@ -94,7 +93,15 @@ class acp_ban
|
||||||
{
|
{
|
||||||
trigger_error($abort_ban . adm_back_link($this->u_action));
|
trigger_error($abort_ban . adm_back_link($this->u_action));
|
||||||
}
|
}
|
||||||
user_ban($mode, $ban, $ban_length, $ban_length_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
|
||||||
|
$ban_start = new \DateTime();
|
||||||
|
$ban_start->setTimestamp(time());
|
||||||
|
$ban_end = $ban_manager->get_ban_end($user, $ban_start, $ban_length, $ban_length_other);
|
||||||
|
|
||||||
|
$ban = explode("\n", $ban);
|
||||||
|
$ban_manager->ban($mode, $ban, $ban_start, $ban_end, $ban_reason, $ban_give_reason);
|
||||||
|
|
||||||
|
//user_ban($mode, $ban, $ban_length, $ban_length_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this event to perform actions after the ban has been performed
|
* Use this event to perform actions after the ban has been performed
|
||||||
|
|
|
@ -3163,7 +3163,7 @@ function display_ban_options($mode)
|
||||||
$ban_rows = $ban_manager->get_bans($mode);
|
$ban_rows = $ban_manager->get_bans($mode);
|
||||||
|
|
||||||
$banned_options = array();
|
$banned_options = array();
|
||||||
foreach ($ban_rows as $row)
|
foreach ($ban_rows as $ban_row)
|
||||||
{
|
{
|
||||||
$banned_options[] = '<option value="' . $ban_row['ban_id'] . '">' . $ban_row['ban_item'] . '</option>';
|
$banned_options[] = '<option value="' . $ban_row['ban_id'] . '">' . $ban_row['ban_item'] . '</option>';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue