]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge pull request #2682 from annando/1607-api-generic-xml
[friendica.git] / include / items.php
index f5e568306e4765c8a5a467a5ee5d8c7859f68d2b..1d2a775c49d27c822ef474bec1fa0093ea808393 100644 (file)
@@ -1404,16 +1404,8 @@ function new_follower($importer,$contact,$datarray,$item,$sharing = false) {
                                dbesc($url)
                );
                if(count($r)) {
-                               $contact_record = $r[0];
-
-                               $photos = import_profile_photo($photo,$importer["uid"],$contact_record["id"]);
-
-                               q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `id` = %d",
-                                       dbesc($photos[0]),
-                                       dbesc($photos[1]),
-                                       dbesc($photos[2]),
-                                       intval($contact_record["id"])
-                               );
+                       $contact_record = $r[0];
+                       update_contact_avatar($photo, $importer["uid"], $contact_record["id"], true);
                }