mirror of
https://github.com/friendica/friendica
synced 2025-04-22 15:50:10 +00:00
Changed default value
This commit is contained in:
parent
e374aecc46
commit
6d3949d54a
10 changed files with 12 additions and 12 deletions
|
@ -77,7 +77,7 @@ class Search
|
|||
// 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());
|
||||
|
||||
$result = new ContactResult(
|
||||
$user_data['name'] ?? '',
|
||||
|
@ -143,7 +143,7 @@ class Search
|
|||
|
||||
foreach ($profiles as $profile) {
|
||||
$profile_url = $profile['url'] ?? '';
|
||||
$contactDetails = Contact::getByURLForUser($profile_url, local_user(), false);
|
||||
$contactDetails = Contact::getByURLForUser($profile_url, local_user());
|
||||
|
||||
$result = new ContactResult(
|
||||
$profile['name'] ?? '',
|
||||
|
@ -232,7 +232,7 @@ class Search
|
|||
continue;
|
||||
}
|
||||
|
||||
$contact = Contact::getByURLForUser($row["nurl"], local_user(), false);
|
||||
$contact = Contact::getByURLForUser($row["nurl"], local_user());
|
||||
|
||||
if ($contact["name"] == "") {
|
||||
$contact["name"] = end(explode("/", $urlParts["path"]));
|
||||
|
|
|
@ -238,7 +238,7 @@ class Contact
|
|||
* @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, $update = null, array $fields = [])
|
||||
public static function getByURLForUser(string $url, int $uid = 0, $update = false, array $fields = [])
|
||||
{
|
||||
if ($uid != 0) {
|
||||
$contact = self::getByURL($url, $update, $fields, $uid);
|
||||
|
|
|
@ -111,7 +111,7 @@ class GContact
|
|||
continue;
|
||||
}
|
||||
|
||||
$gcontacts[] = Contact::getByURLForUser($result['nurl'], local_user(), false);
|
||||
$gcontacts[] = Contact::getByURLForUser($result['nurl'], local_user());
|
||||
}
|
||||
DBA::close($results);
|
||||
return $gcontacts;
|
||||
|
|
|
@ -79,7 +79,7 @@ class AllFriends extends BaseModule
|
|||
$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));
|
||||
|
||||
$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
|
||||
|
|
|
@ -65,7 +65,7 @@ class Hovercard extends BaseModule
|
|||
// 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());
|
||||
} else {
|
||||
$contact = Contact::getByURL($contact_url, false);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ class Contacts extends BaseProfile
|
|||
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']));
|
||||
|
||||
$contacts[] = [
|
||||
'id' => $contact['id'],
|
||||
|
|
|
@ -755,7 +755,7 @@ class DFRN
|
|||
{
|
||||
$author = $doc->createElement($element);
|
||||
|
||||
$contact = Contact::getByURLForUser($contact_url, $item["uid"], null, ['url', 'name', 'addr', 'photo']);
|
||||
$contact = Contact::getByURLForUser($contact_url, $item["uid"], false, ['url', 'name', 'addr', 'photo']);
|
||||
if (!empty($contact)) {
|
||||
XML::addElement($doc, $author, "name", $contact["name"]);
|
||||
XML::addElement($doc, $author, "uri", $contact["url"]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue