mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user