Update existing contact records with data from probing
This commit is contained in:
parent
a47e1e13d7
commit
69f20959ff
|
@ -625,7 +625,7 @@ function get_contact($url, $uid = 0, $no_update = false) {
|
||||||
|
|
||||||
update_contact_avatar($data["photo"], $uid, $contact_id);
|
update_contact_avatar($data["photo"], $uid, $contact_id);
|
||||||
|
|
||||||
$contact = dba::select('contact', array('addr', 'alias', 'name', 'nick', 'avatar-date'),
|
$contact = dba::select('contact', array('addr', 'alias', 'name', 'nick', 'keywords', 'location', 'about', 'avatar-date'),
|
||||||
array('id' => $contact_id), array('limit' => 1));
|
array('id' => $contact_id), array('limit' => 1));
|
||||||
|
|
||||||
// This condition should always be true
|
// This condition should always be true
|
||||||
|
@ -638,6 +638,16 @@ function get_contact($url, $uid = 0, $no_update = false) {
|
||||||
'name' => $data['name'],
|
'name' => $data['name'],
|
||||||
'nick' => $data['nick']);
|
'nick' => $data['nick']);
|
||||||
|
|
||||||
|
if ($data['keywords'] != '') {
|
||||||
|
$updated['keywords'] = $data['keywords'];
|
||||||
|
}
|
||||||
|
if ($data['location'] != '') {
|
||||||
|
$updated['location'] = $data['location'];
|
||||||
|
}
|
||||||
|
if ($data['about'] != '') {
|
||||||
|
$updated['about'] = $data['about'];
|
||||||
|
}
|
||||||
|
|
||||||
if (($data["addr"] != $contact["addr"]) || ($data["alias"] != $contact["alias"])) {
|
if (($data["addr"] != $contact["addr"]) || ($data["alias"] != $contact["alias"])) {
|
||||||
$updated['uri-date'] = datetime_convert();
|
$updated['uri-date'] = datetime_convert();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user