mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge branch '3.1.x'
This commit is contained in:
commit
f1df8e2688
1 changed files with 7 additions and 0 deletions
|
@ -168,6 +168,13 @@ class upload extends \phpbb\avatar\driver\driver
|
|||
return false;
|
||||
}
|
||||
|
||||
// Delete current avatar if not overwritten
|
||||
$ext = substr(strrchr($row['avatar'], '.'), 1);
|
||||
if ($ext && $ext !== $file->get('extension'))
|
||||
{
|
||||
$this->delete($row);
|
||||
}
|
||||
|
||||
return array(
|
||||
'avatar' => $row['id'] . '_' . time() . '.' . $file->get('extension'),
|
||||
'avatar_width' => $file->get('width'),
|
||||
|
|
Loading…
Add table
Reference in a new issue