diff options
author | Friendika <info@friendika.com> | 2011-10-18 01:12:51 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-10-18 01:12:51 -0700 |
commit | fb5bddb98f3c30b1b387c42d833fe56e349d77af (patch) | |
tree | 80cc41982bb1514aa86b18ade2dcbde17d7d126a /include/diaspora.php | |
parent | 85c644a8282ac043fd9245820dcd761865ca34ff (diff) | |
download | volse-hubzilla-fb5bddb98f3c30b1b387c42d833fe56e349d77af.tar.gz volse-hubzilla-fb5bddb98f3c30b1b387c42d833fe56e349d77af.tar.bz2 volse-hubzilla-fb5bddb98f3c30b1b387c42d833fe56e349d77af.zip |
a few issues with diaspora_profile
Diffstat (limited to 'include/diaspora.php')
-rw-r--r-- | include/diaspora.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index 5ad1a9733..cb5e40f5b 100644 --- a/include/diaspora.php +++ b/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) { |