don't scale avatar if original already matches size
darcs-hash:20080528144202-84dde-d0f15e4ad4c840816bfadf3b1b57faecdfd401b2.gz
This commit is contained in:
parent
e0cce107bf
commit
84dfd8b52d
|
@ -126,7 +126,10 @@ class AvatarAction extends SettingsAction {
|
|||
$avatar->created = DB_DataObject_Cast::dateTime(); # current time
|
||||
|
||||
foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) {
|
||||
$scaled[] = $this->scale_avatar($user, $avatar, $size);
|
||||
# We don't need a scaled one if the original is already of that size!
|
||||
if ($avatar->width != $size && $avatar->height != $size) {
|
||||
$scaled[] = $this->scale_avatar($user, $avatar, $size);
|
||||
}
|
||||
}
|
||||
|
||||
# XXX: start a transaction here
|
||||
|
|
Loading…
Reference in New Issue
Block a user