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:
Mikael Nordfeldth
2013-10-01 11:37:59 +02:00
parent a7e748479c
commit b0dfc70a54
47 changed files with 219 additions and 335 deletions

View File

@@ -151,7 +151,7 @@ class UserEmailSummaryHandler extends QueueHandler
continue;
}
$avatar = $profile->getAvatar(AVATAR_STREAM_SIZE);
$avatarUrl = $profile->avatarUrl(AVATAR_STREAM_SIZE);
$out->elementStart('tr');
$out->elementStart('td', array('width' => AVATAR_STREAM_SIZE,
@@ -159,9 +159,7 @@ class UserEmailSummaryHandler extends QueueHandler
'align' => 'left',
'valign' => 'top',
'style' => 'border-bottom: 1px dotted #C5CEE3; padding: 10px 6px 10px 6px;'));
$out->element('img', array('src' => ($avatar) ?
$avatar->displayUrl() :
Avatar::defaultImage(AVATAR_STREAM_SIZE),
$out->element('img', array('src' => $avatarUrl,
'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE,
'alt' => $profile->getBestName()));