mirror of
https://github.com/friendica/friendica
synced 2025-05-14 08:24:10 +02:00
Removed redundant maximagesize = INF statements
This commit is contained in:
parent
00808326c2
commit
79235b6db1
4 changed files with 3 additions and 23 deletions
|
@ -171,11 +171,7 @@ class Upload extends \Friendica\BaseModule
|
|||
|
||||
$maximagesize = Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize'));
|
||||
|
||||
if ($maximagesize == 0) {
|
||||
$maximagesize = INF;
|
||||
}
|
||||
|
||||
if (!empty($maximagesize) && $filesize > $maximagesize) {
|
||||
if ($maximagesize && $filesize > $maximagesize) {
|
||||
// Scale down to multiples of 640 until the maximum size isn't exceeded anymore
|
||||
foreach ([5120, 2560, 1280, 640] as $pixels) {
|
||||
if ($filesize > $maximagesize && max($width, $height) > $pixels) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue