Merge pull request #4527 from annando/fix-no-constant-update
Bugfix: No constant update in "getIdForUrl"
This commit is contained in:
commit
b5f8d73833
1 changed files with 2 additions and 2 deletions
|
@ -669,11 +669,11 @@ class Contact extends BaseObject
|
||||||
|
|
||||||
/// @todo Verify if we can't use Contact::getDetailsByUrl instead of the following
|
/// @todo Verify if we can't use Contact::getDetailsByUrl instead of the following
|
||||||
// We first try the nurl (http://server.tld/nick), most common case
|
// We first try the nurl (http://server.tld/nick), most common case
|
||||||
$contact = dba::selectFirst('contact', ['id', 'avatar-date'], ['nurl' => normalise_link($url), 'uid' => $uid]);
|
$contact = dba::selectFirst('contact', ['id', 'avatar', 'avatar-date'], ['nurl' => normalise_link($url), 'uid' => $uid]);
|
||||||
|
|
||||||
// Then the addr (nick@server.tld)
|
// Then the addr (nick@server.tld)
|
||||||
if (!DBM::is_result($contact)) {
|
if (!DBM::is_result($contact)) {
|
||||||
$contact = dba::selectFirst('contact', ['id', 'avatar-date'], ['addr' => $url, 'uid' => $uid]);
|
$contact = dba::selectFirst('contact', ['id', 'avatar', 'avatar-date'], ['addr' => $url, 'uid' => $uid]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Then the alias (which could be anything)
|
// Then the alias (which could be anything)
|
||||||
|
|
Loading…
Reference in a new issue