From b94cb8d234d70bc534ad1cef767b9f62d10eef26 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 4 Nov 2010 23:50:32 -0700 Subject: add micro profile photo --- mod/profile_photo.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mod/profile_photo.php') diff --git a/mod/profile_photo.php b/mod/profile_photo.php index b21d9162a..32ace62f0 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -68,6 +68,13 @@ function profile_photo_post(&$a) { if($r === false) notice( t('Image size reduction [80] failed.') . EOL ); + $im->scaleImage(48); + + $r = $im->store(local_user(), 0, $base_image['resource-id'],$base_image['filename'], t('Profile Photos'), 6, 1); + + if($r === false) + notice( t('Image size reduction [48] failed.') . EOL ); + // Unset the profile photo flag from any other photos I own $r = q("UPDATE `photo` SET `profile` = 0 WHERE `profile` = 1 AND `resource-id` != '%s' AND `uid` = %d", -- cgit v1.2.3