forked from GNUsocial/gnu-social
[ENTITY] Cache AttachmentThumbnail query result
This commit is contained in:
parent
65999bd183
commit
cdef6858ce
@ -125,7 +125,6 @@ class AttachmentThumbnail extends Entity
|
|||||||
});
|
});
|
||||||
} catch (NotFoundException $e) {
|
} catch (NotFoundException $e) {
|
||||||
$thumbnail = self::create(['attachment_id' => $attachment->getId(), 'width' => $width, 'height' => $height, 'attachment' => $attachment]);
|
$thumbnail = self::create(['attachment_id' => $attachment->getId(), 'width' => $width, 'height' => $height, 'attachment' => $attachment]);
|
||||||
|
|
||||||
$event_map = ['image' => 'ResizeImage', 'video' => 'ResizeVideo'];
|
$event_map = ['image' => 'ResizeImage', 'video' => 'ResizeVideo'];
|
||||||
$major_mime = Media::mimetypeMajor($attachment->getMimetype());
|
$major_mime = Media::mimetypeMajor($attachment->getMimetype());
|
||||||
if (in_array($major_mime, array_keys($event_map))) {
|
if (in_array($major_mime, array_keys($event_map))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user