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:
@@ -174,9 +174,12 @@ class ShowgroupmessageAction extends Action
|
||||
*/
|
||||
function etag()
|
||||
{
|
||||
$avatar = $this->sender->getAvatar(AVATAR_STREAM_SIZE);
|
||||
|
||||
$avtime = ($avatar) ? strtotime($avatar->modified) : 0;
|
||||
try {
|
||||
$avatar = $this->sender->getAvatar(AVATAR_STREAM_SIZE);
|
||||
$avtime = strtotime($avatar->modified);
|
||||
} catch (Exception $e) {
|
||||
$avtime = 0;
|
||||
}
|
||||
|
||||
return 'W/"' . implode(':', array($this->arg('action'),
|
||||
common_user_cache_hash(),
|
||||
|
@@ -78,10 +78,8 @@ class GroupMessageListItem extends Widget
|
||||
$this->out->elementStart('a',
|
||||
array('href' => $sender->profileurl,
|
||||
'class' => 'url'));
|
||||
$avatar = $sender->getAvatar(AVATAR_STREAM_SIZE);
|
||||
$this->out->element('img', array('src' => ($avatar) ?
|
||||
$avatar->displayUrl() :
|
||||
Avatar::defaultImage(AVATAR_STREAM_SIZE),
|
||||
$avatarUrl = $sender->avatarUrl(AVATAR_STREAM_SIZE);
|
||||
$this->out->element('img', array('src' => $avatarUrl,
|
||||
'width' => AVATAR_STREAM_SIZE,
|
||||
'height' => AVATAR_STREAM_SIZE,
|
||||
'class' => 'photo avatar',
|
||||
|
Reference in New Issue
Block a user