mirror of
https://github.com/friendica/friendica
synced 2025-04-27 05:50:10 +00:00
add micro profile photo
This commit is contained in:
parent
71ae08d506
commit
b94cb8d234
12 changed files with 77 additions and 13 deletions
|
@ -235,8 +235,18 @@ function import_profile_photo($photo,$uid,$cid) {
|
|||
if($r === false)
|
||||
$photo_failure = true;
|
||||
|
||||
$img->scaleImage(48);
|
||||
|
||||
$r = $img->store($uid, $cid, $hash, $filename, t('Contact Photos'), 6 );
|
||||
|
||||
if($r === false)
|
||||
$photo_failure = true;
|
||||
|
||||
|
||||
|
||||
$photo = $a->get_baseurl() . '/photo/' . $hash . '-4.jpg';
|
||||
$thumb = $a->get_baseurl() . '/photo/' . $hash . '-5.jpg';
|
||||
$micro = $a->get_baseurl() . '/photo/' . $hash . '-6.jpg';
|
||||
}
|
||||
else
|
||||
$photo_failure = true;
|
||||
|
@ -244,8 +254,9 @@ function import_profile_photo($photo,$uid,$cid) {
|
|||
if($photo_failure) {
|
||||
$photo = $a->get_baseurl() . '/images/default-profile.jpg';
|
||||
$thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg';
|
||||
$micro = $a->get_baseurl() . '/images/default-profile-mm.jpg';
|
||||
}
|
||||
|
||||
return(array($photo,$thumb));
|
||||
return(array($photo,$thumb,$micro));
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue