mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:00:16 +00:00
Extracted as variable to have 2 more array fields moved to array initialization.
This commit is contained in:
parent
676ca36c52
commit
1210e235fb
1 changed files with 5 additions and 4 deletions
|
@ -703,6 +703,7 @@ class Contact
|
|||
}
|
||||
|
||||
$file_suffix = 'jpg';
|
||||
$url = DI::baseUrl() . '/profile/' . $user['nickname'];
|
||||
|
||||
$fields = [
|
||||
'name' => $profile['name'],
|
||||
|
@ -717,7 +718,10 @@ class Contact
|
|||
'xmpp' => $profile['xmpp'],
|
||||
'matrix' => $profile['matrix'],
|
||||
'network' => Protocol::DFRN,
|
||||
'url' => DI::baseUrl() . '/profile/' . $user['nickname'],
|
||||
'url' => $url,
|
||||
// it seems as if ported accounts can have wrong values, so we make sure that now everything is fine.
|
||||
'nurl' => Strings::normaliseLink($url),
|
||||
'uri-id' => ItemURI::getIdByURI($url),
|
||||
'addr' => $user['nickname'] . '@' . substr(DI::baseUrl(), strpos(DI::baseUrl(), '://') + 3),
|
||||
'request' => DI::baseUrl() . '/dfrn_request/' . $user['nickname'],
|
||||
'notify' => DI::baseUrl() . '/dfrn_notify/' . $user['nickname'],
|
||||
|
@ -726,9 +730,6 @@ class Contact
|
|||
'poco' => DI::baseUrl() . '/poco/' . $user['nickname'],
|
||||
];
|
||||
|
||||
// it seems as if ported accounts can have wrong values, so we make sure that now everything is fine.
|
||||
$fields['nurl'] = Strings::normaliseLink($fields['url']);
|
||||
$fields['uri-id'] = ItemURI::getIdByURI($fields['url']);
|
||||
|
||||
$avatar = Photo::selectFirst(['resource-id', 'type'], ['uid' => $uid, 'profile' => true]);
|
||||
if (DBA::isResult($avatar)) {
|
||||
|
|
Loading…
Reference in a new issue