aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/diaspora.php9
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) {