X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContact%2FAvatar.php;h=e039a52799fc524e98f605cbb00ad51e198307a1;hb=f609e38600f54fe8465d1194008d823103f41baa;hp=711a8549f26a96c7f6b85ec9de93a001210ae2b2;hpb=46660c94628bdbad2ce9b36368bb55df120497d3;p=friendica.git diff --git a/src/Contact/Avatar.php b/src/Contact/Avatar.php index 711a8549f2..e039a52799 100644 --- a/src/Contact/Avatar.php +++ b/src/Contact/Avatar.php @@ -1,6 +1,6 @@ getBlurHash(); + $fields['photo'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_SMALL, $timestamp); $fields['thumb'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_THUMB, $timestamp); $fields['micro'] = self::storeAvatarCache($image, $filename, Proxy::PIXEL_MICRO, $timestamp); @@ -244,13 +246,16 @@ class Avatar * Delete locally cached avatar pictures of a contact * * @param string $avatar - * @return void + * @return bool */ - public static function deleteCache(array $contact) + public static function deleteCache(array $contact): bool { + $existed = (self::isCacheFile($contact['photo']) || self::isCacheFile($contact['thumb']) || self::isCacheFile($contact['micro'])); self::deleteCacheFile($contact['photo']); self::deleteCacheFile($contact['thumb']); self::deleteCacheFile($contact['micro']); + + return $existed; } /**