Merge pull request #222 from annando/1410-deleted-contact-data
Bugfix: deleted contact datapull/223/head
commit
d0d23ec2b6
|
@ -872,6 +872,9 @@ function statusnet_address($contact) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function statusnet_fetch_contact($uid, $contact, $create_user) {
|
function statusnet_fetch_contact($uid, $contact, $create_user) {
|
||||||
|
if ($contact->statusnet_profile_url == "")
|
||||||
|
return(-1);
|
||||||
|
|
||||||
// Check if the unique contact is existing
|
// Check if the unique contact is existing
|
||||||
// To-Do: only update once a while
|
// To-Do: only update once a while
|
||||||
$r = q("SELECT id FROM unique_contacts WHERE url='%s' LIMIT 1",
|
$r = q("SELECT id FROM unique_contacts WHERE url='%s' LIMIT 1",
|
||||||
|
@ -950,16 +953,12 @@ function statusnet_fetch_contact($uid, $contact, $create_user) {
|
||||||
q("UPDATE `contact` SET `photo` = '%s',
|
q("UPDATE `contact` SET `photo` = '%s',
|
||||||
`thumb` = '%s',
|
`thumb` = '%s',
|
||||||
`micro` = '%s',
|
`micro` = '%s',
|
||||||
`name-date` = '%s',
|
|
||||||
`uri-date` = '%s',
|
|
||||||
`avatar-date` = '%s'
|
`avatar-date` = '%s'
|
||||||
WHERE `id` = %d",
|
WHERE `id` = %d",
|
||||||
dbesc($photos[0]),
|
dbesc($photos[0]),
|
||||||
dbesc($photos[1]),
|
dbesc($photos[1]),
|
||||||
dbesc($photos[2]),
|
dbesc($photos[2]),
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
dbesc(datetime_convert()),
|
|
||||||
dbesc(datetime_convert()),
|
|
||||||
intval($contact_id)
|
intval($contact_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -892,6 +892,9 @@ function twitter_queue_hook(&$a,&$b) {
|
||||||
function twitter_fetch_contact($uid, $contact, $create_user) {
|
function twitter_fetch_contact($uid, $contact, $create_user) {
|
||||||
require_once("include/Photo.php");
|
require_once("include/Photo.php");
|
||||||
|
|
||||||
|
if ($contact->id_str == "")
|
||||||
|
return(-1);
|
||||||
|
|
||||||
$avatar = str_replace("_normal.", ".", $contact->profile_image_url_https);
|
$avatar = str_replace("_normal.", ".", $contact->profile_image_url_https);
|
||||||
|
|
||||||
$info = get_photo_info($avatar);
|
$info = get_photo_info($avatar);
|
||||||
|
|
Loading…
Reference in New Issue