Browse Source

a few issues with diaspora_profile

pull/1/head
Friendika 10 years ago
parent
commit
fb5bddb98f
  1. 9
      include/diaspora.php

9
include/diaspora.php

@ -1123,10 +1123,14 @@ function diaspora_profile($importer,$xml) {
);
$oldphotos = ((count($r)) ? $r : null);
require_once('include/Photo.php');
$images = import_profile_photo($image_url,$importer['uid'],$contact['id']);
// Generic birthday. We don't know the timezone. The year is irrelevant.
$birthday = str_replace('1000','1901',$birthday);
$birthday = datetime_convert('UTC','UTC',$birthday,'Y-m-d');
$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 LIMIT 1",
@ -1136,10 +1140,11 @@ function diaspora_profile($importer,$xml) {
dbesc($images[1]),
dbesc($images[2]),
dbesc(datetime_convert()),
dbesc($birthday),
intval($contact['id']),
intval($importer['uid']),
dbesc($birthday)
intval($importer['uid'])
);
if($r) {
if($oldphotos) {
foreach($oldphotos as $ph) {

Loading…
Cancel
Save