Browse Source
Merge pull request #20145 from nextcloud/bugfix/noid/generated-avatars-and-nophoto-cache
Fix generated avatars and nophoto cache files
pull/20153/head
blizzz
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
3 additions and
3 deletions
-
apps/dav/lib/CardDAV/PhotoCache.php
-
lib/private/Avatar/UserAvatar.php
|
|
|
@ -108,7 +108,7 @@ class PhotoCache { |
|
|
|
$data = $this->getPhoto($card); |
|
|
|
|
|
|
|
if ($data === false || !isset($data['Content-Type'])) { |
|
|
|
$folder->newFile('nophoto'); |
|
|
|
$folder->newFile('nophoto', ''); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
@ -116,7 +116,7 @@ class PhotoCache { |
|
|
|
$extension = self::ALLOWED_CONTENT_TYPES[$contentType] ?? null; |
|
|
|
|
|
|
|
if ($extension === null) { |
|
|
|
$folder->newFile('nophoto'); |
|
|
|
$folder->newFile('nophoto', ''); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -252,7 +252,7 @@ class UserAvatar extends Avatar { |
|
|
|
$avatar->putContent($data); |
|
|
|
$ext = 'png'; |
|
|
|
|
|
|
|
$this->folder->newFile('generated'); |
|
|
|
$this->folder->newFile('generated', ''); |
|
|
|
$this->config->setUserValue($this->user->getUID(), 'avatar', 'generated', 'true'); |
|
|
|
} |
|
|
|
|
|
|
|
|