[ticket/11842] Use group_id 0 and correct avatar name after creating group

It seems like the function group_correct_avatar() was forgotten while adding
the new avatar system. We now pass the group_id 0 to the upload avatar and
let the function group_correct_avatar() fix the avatar filename after creating
the group like it was done previously.

PHPBB3-11842
This commit is contained in:
Marc Alexander 2013-10-24 13:14:51 +02:00
parent 2adf3d7a34
commit 3c632fa8e4
2 changed files with 5 additions and 1 deletions

View file

@ -325,6 +325,10 @@ class acp_groups
// This is normalised data, without the group_ prefix
$avatar_data = \phpbb\avatar\manager::clean_row($group_row);
if (!isset($avatar_data['id']))
{
$avatar_data['id'] = $group_id;
}
}

View file

@ -2314,7 +2314,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
{
$group_id = $db->sql_nextid();
if (isset($sql_ary['group_avatar_type']) && $sql_ary['group_avatar_type'] == AVATAR_UPLOAD)
if (isset($sql_ary['group_avatar_type']) && $sql_ary['group_avatar_type'] == 'avatar.driver.upload')
{
group_correct_avatar($group_id, $sql_ary['group_avatar']);
}