projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e02d69
)
Add thumbnail
author
Cyperghost
<olaf_schmitz_1@t-online.de>
Wed, 18 Dec 2024 10:15:22 +0000
(11:15 +0100)
committer
Cyperghost
<olaf_schmitz_1@t-online.de>
Wed, 18 Dec 2024 10:15:22 +0000
(11:15 +0100)
wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php
patch
|
blob
|
blame
|
history
wcfsetup/install/files/lib/system/file/processor/UserCoverPhotoFileProcessor.class.php
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php
b/wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php
index 3c1083fdf857edcda627b60ed5618bf903addf80..0f4a1d50df2b2120300f1952f8cbb84da165128d 100644
(file)
--- a/
wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php
+++ b/
wcfsetup/install/files/lib/action/UserCoverPhotoAction.class.php
@@
-75,6
+75,7
@@
final class UserCoverPhotoAction implements RequestHandlerInterface
->singleFileUpload()
->bigPreview()
->simpleReplace()
+ ->thumbnailSize('small')
]);
$form->markRequiredFields(false);
diff --git
a/wcfsetup/install/files/lib/system/file/processor/UserCoverPhotoFileProcessor.class.php
b/wcfsetup/install/files/lib/system/file/processor/UserCoverPhotoFileProcessor.class.php
index 1be6643af1c505010738d048d023a289c55cf9fb..b5e7604a6d119c96c7aa54f49de8580f5d6113bf 100644
(file)
--- a/
wcfsetup/install/files/lib/system/file/processor/UserCoverPhotoFileProcessor.class.php
+++ b/
wcfsetup/install/files/lib/system/file/processor/UserCoverPhotoFileProcessor.class.php
@@
-213,4
+213,17
@@
final class UserCoverPhotoFileProcessor extends AbstractFileProcessor
new ImageCropSize(UserCoverPhoto::MAX_WIDTH, UserCoverPhoto::MAX_HEIGHT)
);
}
+
+ #[\Override]
+ public function getThumbnailFormats(): array
+ {
+ return [
+ new ThumbnailFormat(
+ 'small',
+ UserCoverPhoto::MIN_HEIGHT,
+ UserCoverPhoto::MIN_WIDTH,
+ false,
+ ),
+ ];
+ }
}