a few issues with diaspora_profile
This commit is contained in:
parent
85c644a828
commit
fb5bddb98f
|
@ -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…
Reference in a new issue