mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 07:35:14 +00:00
implement diaspora profile message (oops) or updated profile photos won't be updated
This commit is contained in:
parent
b9a760783d
commit
872b165eb2
2 changed files with 5 additions and 22 deletions
|
@ -2168,8 +2168,7 @@ function diaspora_profile($importer,$xml,$msg) {
|
|||
if($name === '') {
|
||||
$name = $handle_parts[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( preg_match("|^https?://|", $image_url) === 0) {
|
||||
$image_url = "http://" . $handle_parts[1] . $image_url;
|
||||
}
|
||||
|
@ -2190,32 +2189,16 @@ function diaspora_profile($importer,$xml,$msg) {
|
|||
if(substr($birthday,5) === substr($contact['bd'],5))
|
||||
$birthday = $contact['bd'];
|
||||
|
||||
// TODO: update name on item['author-name'] if the name changed. See consume_feed()
|
||||
// Not doing this currently because D* protocol is scheduled for revision soon.
|
||||
|
||||
/* $r = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s', `avatar-date` = '%s' , `bd` = '%s' WHERE `id` = %d AND `uid` = %d",
|
||||
$r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s' ",
|
||||
dbesc($name),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($images[0]),
|
||||
dbesc($images[1]),
|
||||
dbesc($images[2]),
|
||||
dbesc($images[3]),
|
||||
dbesc(datetime_convert()),
|
||||
dbesc($birthday),
|
||||
intval($contact['id']),
|
||||
intval($importer['channel_id'])
|
||||
intval($contact['xchan_hash'])
|
||||
);
|
||||
*/
|
||||
/* if($r) {
|
||||
if($oldphotos) {
|
||||
foreach($oldphotos as $ph) {
|
||||
q("DELETE FROM `photo` WHERE `uid` = %d AND `contact-id` = %d AND `album` = 'Contact Photos' AND `resource-id` = '%s' ",
|
||||
intval($importer['channel_id']),
|
||||
intval($contact['id']),
|
||||
dbesc($ph['resource-id'])
|
||||
);
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
return;
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
2015-01-28.930
|
||||
2015-01-29.931
|
||||
|
|
Loading…
Reference in a new issue