]> git.mxchange.org Git - friendica-addons.git/commitdiff
Bugfix: The Statusnet connector destroyed the avatar and the name
authorMichael Vogel <icarus@dabo.de>
Sat, 28 Nov 2015 18:33:41 +0000 (19:33 +0100)
committerMichael Vogel <icarus@dabo.de>
Sat, 28 Nov 2015 18:33:41 +0000 (19:33 +0100)
statusnet/statusnet.php

index 20f81d6b940a8b6ded3abe679fc8d378c6dfc752..da6cb8af58335f98b218c93da57e500a5133fe91 100644 (file)
@@ -932,8 +932,8 @@ function statusnet_fetch_contact($uid, $contact, $create_user) {
                        dbesc($contact->description),
                        dbesc(normalise_link($contact->statusnet_profile_url)));
 
-       $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `alias` = '%s' LIMIT 1",
-               intval($uid), dbesc(normalise_link($contact->statusnet_profile_url)));
+       $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `alias` = '%s' AND `network` = '%s'LIMIT 1",
+               intval($uid), dbesc(normalise_link($contact->statusnet_profile_url)), dbesc(NETWORK_STATUSNET));
 
        if(!count($r) AND !$create_user)
                return(0);
@@ -966,10 +966,10 @@ function statusnet_fetch_contact($uid, $contact, $create_user) {
                        intval(1)
                );
 
-               $r = q("SELECT * FROM `contact` WHERE `alias` = '%s' AND `uid` = %d LIMIT 1",
+               $r = q("SELECT * FROM `contact` WHERE `alias` = '%s' AND `uid` = %d AND `network` = '%s' LIMIT 1",
                        dbesc($contact->statusnet_profile_url),
-                       intval($uid)
-                       );
+                       intval($uid),
+                       dbesc(NETWORK_STATUSNET));
 
                if(! count($r))
                        return(false);