if (DBA::isResult($contact)) {
DI::page()['aside'] = "";
- Model\Profile::load($a, "", Model\Contact::getByURLForUser($contact["url"], 0, [], false));
+ Model\Profile::load($a, "", Model\Contact::getByURL($contact["url"], false));
}
} else {
$contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]);
$entries = [];
foreach ($common_friends as $common_friend) {
//get further details of the contact
- $contact_details = Model\Contact::getByURLForUser($common_friend['url'], $uid, [], false);
+ $contact_details = Model\Contact::getByURLForUser($common_friend['url'], $uid, false);
// $rr['id'] is needed to use contact_photo_menu()
/// @TODO Adding '/" here avoids E_NOTICE on missing constants
$profiledata["about"] = "";
}
- $profiledata = array_merge($profiledata, Contact::getByURLForUser($profiledata["url"], local_user(), [], false));
+ $profiledata = array_merge($profiledata, Contact::getByURLForUser($profiledata["url"], local_user(), false));
if (!empty($profiledata["photo"])) {
$profiledata["photo"] = DI::baseUrl()->remove($profiledata["photo"]);
'hide' => [DI::l10n()->t('Ignore/Hide'), $ignlnk]
];
- $contact_details = array_merge($rr, Contact::getByURLForUser($rr["url"], local_user(), [], false));
+ $contact_details = array_merge($rr, Contact::getByURLForUser($rr["url"], local_user(), false));
$entry = [
'url' => Contact::magicLink($rr['url']),
// Try to detect the contact in various ways
if (strpos($name, 'http://') || strpos($name, '@')) {
- $contact = Contact::getByURLForUser($name, $profile_uid, []);
+ $contact = Contact::getByURLForUser($name, $profile_uid);
} else {
$contact = false;
$fields = ['id', 'url', 'nick', 'name', 'alias', 'network', 'forum', 'prv'];
// Ensure that we do have a contact entry
Contact::getIdForURL($user_data['url'] ?? '');
- $contactDetails = Contact::getByURLForUser($user_data['url'] ?? '', local_user(), [], false);
+ $contactDetails = Contact::getByURLForUser($user_data['url'] ?? '', local_user(), false);
$result = new ContactResult(
$user_data['name'] ?? '',
foreach ($profiles as $profile) {
$profile_url = $profile['url'] ?? '';
- $contactDetails = Contact::getByURLForUser($profile_url, local_user(), [], false);
+ $contactDetails = Contact::getByURLForUser($profile_url, local_user(), false);
$result = new ContactResult(
$profile['name'] ?? '',
continue;
}
- $contact = Contact::getByURLForUser($row["nurl"], local_user(), [], false);
+ $contact = Contact::getByURLForUser($row["nurl"], local_user(), false);
if ($contact["name"] == "") {
$contact["name"] = end(explode("/", $urlParts["path"]));
* @param boolean $update true = always update, false = never update, null = update when not found or outdated
* @return array contact array
*/
- public static function getByURLForUser(string $url, int $uid = 0, array $fields = [], $update = null)
+ public static function getByURLForUser(string $url, int $uid = 0, $update = null, array $fields = [])
{
if ($uid != 0) {
$contact = self::getByURL($url, $update, $fields, $uid);
continue;
}
- $gcontacts[] = Contact::getByURLForUser($result['nurl'], local_user(), [], false);
+ $gcontacts[] = Contact::getByURLForUser($result['nurl'], local_user(), false);
}
DBA::close($results);
return $gcontacts;
$entries = [];
foreach ($friends as $friend) {
//get further details of the contact
- $contactDetails = array_merge($friend, Model\Contact::getByURLForUser($friend['url'], $uid, [], false));
+ $contactDetails = array_merge($friend, Model\Contact::getByURLForUser($friend['url'], $uid, false));
$connlnk = '';
// $friend[cid] is only available for common contacts. So if the contact is a common one, use contact_photo_menu to generate the photoMenu
// Search for contact data
// Look if the local user has got the contact
if (Session::isAuthenticated()) {
- $contact = Contact::getByURLForUser($contact_url, local_user(), [], false);
+ $contact = Contact::getByURLForUser($contact_url, local_user(), false);
} else {
$contact = Contact::getByURL($contact_url, false);
}
continue;
}
- $contact_details = array_merge($contact, Contact::getByURLForUser($contact['url'], $a->profile['uid'], [], false));
+ $contact_details = array_merge($contact, Contact::getByURLForUser($contact['url'], $a->profile['uid'], false));
$contacts[] = [
'id' => $contact['id'],
{
$author = $doc->createElement($element);
- $contact = Contact::getByURLForUser($contact_url, $item["uid"], ['url', 'name', 'addr', 'photo']);
+ $contact = Contact::getByURLForUser($contact_url, $item["uid"], null, ['url', 'name', 'addr', 'photo']);
if (!empty($contact)) {
XML::addElement($doc, $author, "name", $contact["name"]);
XML::addElement($doc, $author, "uri", $contact["url"]);