mirror of
https://github.com/friendica/friendica
synced 2025-04-23 11:10:11 +00:00
Imrpoved avatar handling when storing them/partly use of "micro"
This commit is contained in:
parent
f8a20a15d3
commit
0b1188b7fe
8 changed files with 43 additions and 24 deletions
|
@ -138,6 +138,8 @@ function dfrn_request_post(&$a) {
|
|||
|
||||
$dfrn_request = $parms['dfrn-request'];
|
||||
|
||||
$photo = $parms["photo"];
|
||||
|
||||
/********* Escape the entire array ********/
|
||||
|
||||
dbesc_array($parms);
|
||||
|
@ -185,6 +187,9 @@ function dfrn_request_post(&$a) {
|
|||
if(intval($def_gid))
|
||||
group_add_member(local_user(), '', $r[0]['id'], $def_gid);
|
||||
|
||||
if (isset($photo))
|
||||
update_contact_avatar($photo, local_user(), $r[0]["id"], true);
|
||||
|
||||
$forwardurl = $a->get_baseurl()."/contacts/".$r[0]['id'];
|
||||
} else
|
||||
$forwardurl = $a->get_baseurl()."/contacts";
|
||||
|
@ -530,7 +535,7 @@ function dfrn_request_post(&$a) {
|
|||
|
||||
$parms['url'] = $url;
|
||||
$parms['issued-id'] = $issued_id;
|
||||
|
||||
$photo = $parms["photo"];
|
||||
|
||||
dbesc_array($parms);
|
||||
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `name`, `nick`, `issued-id`, `photo`, `site-pubkey`,
|
||||
|
@ -539,7 +544,7 @@ function dfrn_request_post(&$a) {
|
|||
intval($uid),
|
||||
dbesc(datetime_convert()),
|
||||
$parms['url'],
|
||||
dbesc(normalise_link($parms['url'])),
|
||||
dbesc(normalise_link($url)),
|
||||
$parms['addr'],
|
||||
$parms['fn'],
|
||||
$parms['nick'],
|
||||
|
@ -562,8 +567,10 @@ function dfrn_request_post(&$a) {
|
|||
$parms['url'],
|
||||
$parms['issued-id']
|
||||
);
|
||||
if(count($r))
|
||||
if(count($r)) {
|
||||
$contact_record = $r[0];
|
||||
update_contact_avatar($photo, $uid, $contact_record["id"], true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue