$photos = import_profile_photo($photo_url,$contact['uid'],$contact['id']);
q("UPDATE `contact` SET `avatar-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s'
- WHERE `uid` = %d AND `id` = %d",
+ WHERE `uid` = %d AND `id` = %d AND NOT `self`",
dbesc(datetime_convert()),
dbesc($photos[0]),
dbesc($photos[1]),
intval($contact['id'])
);
- $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d AND `name` != '%s'",
+ $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d AND `name` != '%s' AND NOT `self`",
dbesc(notags(trim($new_name))),
dbesc(datetime_convert()),
intval($contact['uid']),
$photos = import_profile_photo($photo_url,$importer['importer_uid'],$importer['id']);
q("UPDATE `contact` SET `avatar-date` = '%s', `photo` = '%s', `thumb` = '%s', `micro` = '%s'
- WHERE `uid` = %d AND `id` = %d",
+ WHERE `uid` = %d AND `id` = %d AND NOT `self`",
dbesc(datetime_convert()),
dbesc($photos[0]),
dbesc($photos[1]),
intval($importer['id'])
);
- $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d AND `name` != '%s'",
+ $x = q("UPDATE `contact` SET `name` = '%s', `name-date` = '%s' WHERE `uid` = %d AND `id` = %d AND `name` != '%s' AND NOT `self`",
dbesc(notags(trim($new_name))),
dbesc(datetime_convert()),
intval($importer['importer_uid']),
// URL reply
if($dfrn_version < 2.2) {
- $s = fetch_url($r[0]['poll']
- . '?dfrn_id=' . $encrypted_id
+ $s = fetch_url($r[0]['poll']
+ . '?dfrn_id=' . $encrypted_id
. '&type=profile-check'
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION
. '&challenge=' . $challenge
'sec' => $sec
));
}
-
+
$profile = ((count($r) && $r[0]['nickname']) ? $r[0]['nickname'] : $nickname);
switch($destination_url) {
case 'status':
case '':
$dest = $a->get_baseurl() . '/profile/' . $profile;
- break;
+ break;
default:
$dest = $destination_url . '?f=&redir=1';
break;
}
}
}
-
-