Merge pull request #20145 from nextcloud/bugfix/noid/generated-avatars-and-nophoto-cache
Fix generated avatars and nophoto cache files
This commit is contained in:
commit
ba14c41a1c
|
@ -108,7 +108,7 @@ class PhotoCache {
|
||||||
$data = $this->getPhoto($card);
|
$data = $this->getPhoto($card);
|
||||||
|
|
||||||
if ($data === false || !isset($data['Content-Type'])) {
|
if ($data === false || !isset($data['Content-Type'])) {
|
||||||
$folder->newFile('nophoto');
|
$folder->newFile('nophoto', '');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ class PhotoCache {
|
||||||
$extension = self::ALLOWED_CONTENT_TYPES[$contentType] ?? null;
|
$extension = self::ALLOWED_CONTENT_TYPES[$contentType] ?? null;
|
||||||
|
|
||||||
if ($extension === null) {
|
if ($extension === null) {
|
||||||
$folder->newFile('nophoto');
|
$folder->newFile('nophoto', '');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,7 +252,7 @@ class UserAvatar extends Avatar {
|
||||||
$avatar->putContent($data);
|
$avatar->putContent($data);
|
||||||
$ext = 'png';
|
$ext = 'png';
|
||||||
|
|
||||||
$this->folder->newFile('generated');
|
$this->folder->newFile('generated', '');
|
||||||
$this->config->setUserValue($this->user->getUID(), 'avatar', 'generated', 'true');
|
$this->config->setUserValue($this->user->getUID(), 'avatar', 'generated', 'true');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue