]> git.mxchange.org Git - friendica.git/blobdiff - mod/crepair.php
Merge pull request #2425 from annando/1603-ostatus
[friendica.git] / mod / crepair.php
index 6f951bdf6eade2dcd2321e63f250455892fe152c..5b4db09dac1f16ab7a0500ccf6b8e90e9cd90dc5 100644 (file)
@@ -80,24 +80,7 @@ function crepair_post(&$a) {
                logger('mod-crepair: updating photo from ' . $photo);
                require_once("include/Photo.php");
 
-               $photos = import_profile_photo($photo,local_user(),$contact['id']);
-
-               $x = q("UPDATE `contact` SET `photo` = '%s',
-                       `thumb` = '%s',
-                       `micro` = '%s',
-                       `name-date` = '%s',
-                       `uri-date` = '%s',
-                       `avatar-date` = '%s'
-                       WHERE `id` = %d
-                       ",
-                       dbesc($photos[0]),
-                       dbesc($photos[1]),
-                       dbesc($photos[2]),
-                       dbesc(datetime_convert()),
-                       dbesc(datetime_convert()),
-                       dbesc(datetime_convert()),
-                       intval($contact['id'])
-               );
+               update_contact_avatar($photo,local_user(),$contact['id']);
        }
 
        if($r)