Merge branch '3.3.x'

This commit is contained in:
Marc Alexander 2024-10-03 11:43:24 +00:00
commit ff7fffa8a4
2 changed files with 24 additions and 2 deletions

View file

@ -396,7 +396,7 @@ class acp_groups
$allow_desc_urls = $request->variable('desc_parse_urls', false); $allow_desc_urls = $request->variable('desc_parse_urls', false);
$allow_desc_smilies = $request->variable('desc_parse_smilies', false); $allow_desc_smilies = $request->variable('desc_parse_smilies', false);
$submit_ary = array( $submit_ary = [
'colour' => $request->variable('group_colour', ''), 'colour' => $request->variable('group_colour', ''),
'rank' => $request->variable('group_rank', 0), 'rank' => $request->variable('group_rank', 0),
'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0, 'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
@ -406,7 +406,13 @@ class acp_groups
'max_recipients' => $request->variable('group_max_recipients', 0), 'max_recipients' => $request->variable('group_max_recipients', 0),
'founder_manage' => 0, 'founder_manage' => 0,
'skip_auth' => $request->variable('group_skip_auth', 0), 'skip_auth' => $request->variable('group_skip_auth', 0),
);
// Initialize avatar data
'avatar' => $avatar_data['avatar'] ?? '',
'avatar_type' => $avatar_data['avatar_type'] ?? '',
'avatar_height' => $avatar_data['avatar_height'] ?? 0,
'avatar_width' => $avatar_data['avatar_width'] ?? 0,
];
if ($user->data['user_type'] == USER_FOUNDER) if ($user->data['user_type'] == USER_FOUNDER)
{ {

View file

@ -123,4 +123,20 @@ class phpbb_functional_acp_groups_test extends phpbb_functional_common_groups_te
$this->assertEquals((bool) $tick_teampage, (bool) ($this->form_data['group_teampage'] ?? false)); $this->assertEquals((bool) $tick_teampage, (bool) ($this->form_data['group_teampage'] ?? false));
} }
} }
public function test_acp_groups_create_existing_name()
{
$this->group_manage_login();
$crawler = self::request('GET', 'adm/index.php?i=groups&mode=manage&sid=' . $this->sid);
$form = $crawler->selectButton($this->lang('SUBMIT'))->form([
'group_name' => 'Guests', // 'Guests' is the group name already in use for predefined Guests group
]);
$crawler = self::submit($form);
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
$crawler = self::submit($form); // Just submit the form with selected group name
$this->assertStringContainsString($this->lang('GROUP_NAME_TAKEN'), $crawler->text());
}
} }