Store avatar cache fields only when needed
This commit is contained in:
parent
398e65d66b
commit
9b86f40a5f
8 changed files with 52 additions and 19 deletions
|
@ -304,7 +304,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
|
|||
*
|
||||
* We will also update the contact record with the nature and scope of the relationship.
|
||||
*/
|
||||
Contact::updateAvatar($contact['photo'], $uid, $contact_id);
|
||||
Contact::updateAvatar($contact_id, $contact['photo']);
|
||||
|
||||
Logger::log('dfrn_confirm: confirm - imported photos');
|
||||
|
||||
|
@ -484,7 +484,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
|
|||
$photo = DI::baseUrl() . '/images/person-300.jpg';
|
||||
}
|
||||
|
||||
Contact::updateAvatar($photo, $local_uid, $dfrn_record);
|
||||
Contact::updateAvatar($dfrn_record, $photo);
|
||||
|
||||
Logger::log('dfrn_confirm: request - photos imported');
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ function dfrn_request_post(App $a)
|
|||
Group::addMember(User::getDefaultGroup(local_user(), $r[0]["network"]), $r[0]['id']);
|
||||
|
||||
if (isset($photo)) {
|
||||
Contact::updateAvatar($photo, local_user(), $r[0]["id"], true);
|
||||
Contact::updateAvatar($r[0]["id"], $photo, true);
|
||||
}
|
||||
|
||||
$forward_path = "contact/" . $r[0]['id'];
|
||||
|
@ -420,7 +420,7 @@ function dfrn_request_post(App $a)
|
|||
);
|
||||
if (DBA::isResult($r)) {
|
||||
$contact_record = $r[0];
|
||||
Contact::updateAvatar($photo, $uid, $contact_record["id"], true);
|
||||
Contact::updateAvatar($contact_record["id"], $photo, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue