mirror of
https://github.com/friendica/friendica
synced 2025-04-27 10:30:10 +00:00
Replaced "getDetailsByURL" with "getByURL/getByURLForUser"
This commit is contained in:
parent
869f3cfec4
commit
d9c6a46ffe
29 changed files with 78 additions and 285 deletions
|
@ -350,7 +350,7 @@ class Acl extends BaseModule
|
|||
continue;
|
||||
}
|
||||
|
||||
$contact = Contact::getDetailsByURL($author);
|
||||
$contact = Contact::getByURL($author, 0, ['micro', 'name', 'id', 'network', 'nick', 'addr', 'url', 'forum'], false);
|
||||
|
||||
if (count($contact) > 0) {
|
||||
$unknown_contacts[] = [
|
||||
|
|
|
@ -237,13 +237,13 @@ class Index extends BaseSearch
|
|||
} else {
|
||||
// Cheaper local lookup for anonymous users, no probe
|
||||
if ($isAddr) {
|
||||
$contact = Contact::selectFirst(['id' => 'cid'], ['addr' => $search, 'uid' => 0]);
|
||||
$contact = Contact::selectFirst(['id'], ['addr' => $search, 'uid' => 0]);
|
||||
} else {
|
||||
$contact = Contact::getDetailsByURL($search, 0, ['cid' => 0]);
|
||||
$contact = array_merge(['id' => 0], Contact::getByURL($search, 0, ['id']));
|
||||
}
|
||||
|
||||
if (DBA::isResult($contact)) {
|
||||
$contact_id = $contact['cid'];
|
||||
$contact_id = $contact['id'];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue