Skip to content

Commit ecff5f8

Browse files
elfinder bugs fixed.
1 parent c1a1fe4 commit ecff5f8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/Backend/Controllers/Media.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ public function index()
1212
public function elfinderConnection()
1313
{
1414
// 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;
1716
$opts = array(
1817
// 'debug' => true,
1918
'roots' => array(
@@ -46,7 +45,7 @@ public function elfinderConnection()
4645
);
4746

4847
$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')) {
5049
$webp_converter = new \claviska\SimpleImage();
5150
foreach ($this->request->getFileMultiple('upload') as $file) {
5251
$file_type = $file->getClientMimeType();

0 commit comments

Comments
 (0)