File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
modules/Backend/Controllers Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ public function index()
12
12
public function elfinderConnection ()
13
13
{
14
14
// ELFinder ayarlarını yapın
15
- $ webpElfinder =$ this ->commonModel ->selectOne ('settings ' , ['option ' =>'elfinderConvertWebp ' ],'content ' );
16
- $ allowedFiles = json_decode (array_reduce (cache ('settings ' ), fn ($ carry , $ item ) => $ carry ?? ('allowedFiles ' == $ item ->option ? $ item : null ))->content );
15
+ $ allowedFiles = $ this ->defData ['settings ' ]->allowedFiles ;
17
16
$ opts = array (
18
17
// 'debug' => true,
19
18
'roots ' => array (
@@ -46,7 +45,7 @@ public function elfinderConnection()
46
45
);
47
46
48
47
$ char_map = ['.jpg ' => '.webp ' , '.png ' => '.webp ' , '.jpeg ' => '.webp ' ];
49
- if ((bool )$ webpElfinder ===true && $ this ->request ->getFileMultiple ('upload ' )) {
48
+ if ((bool )$ this -> defData [ ' settings ' ]-> elfinderConvertWebp -> scalar ===true && $ this ->request ->getFileMultiple ('upload ' )) {
50
49
$ webp_converter = new \claviska \SimpleImage ();
51
50
foreach ($ this ->request ->getFileMultiple ('upload ' ) as $ file ) {
52
51
$ file_type = $ file ->getClientMimeType ();
You can’t perform that action at this time.
0 commit comments