]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #4527 from annando/fix-no-constant-update
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Fri, 2 Mar 2018 09:58:17 +0000 (10:58 +0100)
committerGitHub <noreply@github.com>
Fri, 2 Mar 2018 09:58:17 +0000 (10:58 +0100)
Bugfix: No constant update in "getIdForUrl"

src/Model/Contact.php

index 8a2be5e9ad2ef6ff3d07c9c83e7182c3e51286a6..fc27b0c41099aa606e757fe5cf4ba595b11137fc 100644 (file)
@@ -669,11 +669,11 @@ class Contact extends BaseObject
 
                /// @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
-               $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)
                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)