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:
@@ -64,7 +64,7 @@ class EditMirrorForm extends Form
|
||||
$this->out->hidden('profile', $this->profile->id);
|
||||
|
||||
$this->out->elementStart('div', array('style' => 'float: left; width: 80px;'));
|
||||
$img = $this->getAvatar($this->profile);
|
||||
$img = $this->profile->avatarUrl(AVATAR_STREAM_SIZE);
|
||||
$feed = $this->getFeed($this->profile);
|
||||
$this->out->elementStart('a', array('href' => $this->profile->profileurl));
|
||||
$this->out->element('img', array('src' => $img, 'style' => 'float: left'));
|
||||
@@ -130,16 +130,6 @@ class EditMirrorForm extends Form
|
||||
$this->out->elementEnd('fieldset');
|
||||
}
|
||||
|
||||
private function getAvatar($profile)
|
||||
{
|
||||
$avatar = $this->profile->getAvatar(48);
|
||||
if ($avatar) {
|
||||
return $avatar->displayUrl();
|
||||
} else {
|
||||
return Avatar::defaultImage(48);
|
||||
}
|
||||
}
|
||||
|
||||
private function getFeed($profile)
|
||||
{
|
||||
// Ok this is a bit of a hack. ;)
|
||||
|
Reference in New Issue
Block a user