forked from GNUsocial/gnu-social
Properly unlink all old avatars when deleting/uploading a new
We're also now using $config['image']['jpegquality'] to determine the quality setting for resized images. To set Avatar max size, adjust $config['avatar']['maxsize'] The getAvatar call now throws exceptions too. Related changes applied. Now let's move Profile->avatarUrl to the Avatar class!
This commit is contained in:
@@ -63,13 +63,7 @@ class DefaultProfileBlock extends AccountProfileBlock
|
||||
|
||||
function avatar()
|
||||
{
|
||||
$avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
|
||||
if (empty($avatar)) {
|
||||
$avatar = $this->profile->getAvatar(73);
|
||||
}
|
||||
return (!empty($avatar)) ?
|
||||
$avatar->displayUrl() :
|
||||
Avatar::defaultImage(AVATAR_STREAM_SIZE);
|
||||
return $this->profile->avatarUrl(AVATAR_STREAM_SIZE);
|
||||
}
|
||||
|
||||
function location()
|
||||
@@ -91,4 +85,4 @@ class DefaultProfileBlock extends AccountProfileBlock
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user