From 177bf9b67babc90fd40d1dfb39ce084f390843d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jakob=20Sch=C3=BCrz?= Date: Mon, 13 Mar 2023 17:38:10 +0100 Subject: [PATCH] fix missing DI --- mod/photos.php | 12 +++--------- src/Module/Post/Edit.php | 6 ++---- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index a8b63d12df..440aae92eb 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1141,9 +1141,7 @@ function photos_content(App $a) '$qcomment' => $qcomment, '$rand_num' => Crypto::randomDigits(12), // Dropzone - //'$max_imagesize' => DI::config()->get('system', 'maximagesize'), - // don't know, if DI::config.. does not work here, so it is set to a manual value - '$max_imagesize' => 100000, + '$max_imagesize' => DI::config()->get('system', 'maximagesize'), ]); } } @@ -1200,9 +1198,7 @@ function photos_content(App $a) '$qcomment' => $qcomment, '$rand_num' => Crypto::randomDigits(12), // Dropzone - //'$max_imagesize' => DI::config()->get('system', 'maximagesize'), - // don't know, if DI::config.. does not work here, so it is set to a manual value - '$max_imagesize' => 200000 + '$max_imagesize' => DI::config()->get('system', 'maximagesize'), ]); } @@ -1278,9 +1274,7 @@ function photos_content(App $a) '$qcomment' => $qcomment, '$rand_num' => Crypto::randomDigits(12), // Dropzone - //'$max_imagesize' => DI::config()->get('system', 'maximagesize'), - // don't know, if DI::config.. does not work here, so it is set to a manual value - '$max_imagesize' => 300000 + '$max_imagesize' => DI::config()->get('system', 'maximagesize'), ]); } } diff --git a/src/Module/Post/Edit.php b/src/Module/Post/Edit.php index 87a0c1b9c6..6311deb182 100644 --- a/src/Module/Post/Edit.php +++ b/src/Module/Post/Edit.php @@ -36,6 +36,7 @@ use Friendica\Navigation\SystemMessages; use Friendica\Network\HTTPException; use Friendica\Util\Crypto; use Friendica\Util\Profiler; +use Friendica\DI; use Psr\Log\LoggerInterface; /** @@ -183,10 +184,7 @@ class Edit extends BaseModule '$compose_link_title' => $this->t('Open Compose page'), // Dropzone - //'$max_imagesize' => DI::config()->get('system', 'maximagesize'), - // DI::config.. does not work here, so it is set to a manual value - '$max_imagesize' => 500000, - + '$max_imagesize' => DI::config()->get('system', 'maximagesize'), ]); return $output; -- 2.39.5