]> _ Git - cubist_cms-back.git/commitdiff
.
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Sat, 30 Apr 2022 11:23:11 +0000 (13:23 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Sat, 30 Apr 2022 11:23:11 +0000 (13:23 +0200)
src/app/Magic/Fields/SelectFromArray.php
src/app/Magic/Fields/StandardFile.php

index 8c28c886212dc2b940e0a11fedda246cbfdaacc9..6fe96bf77b147134abdb47450f24040cb9781c87 100644 (file)
@@ -43,7 +43,7 @@ class SelectFromArray extends Field
             $data[$k] = ['t' => $v, 'n' => self::normalize($v)];
         }
         $hash = hash('sha256', print_r($data, true));
-        Cache::add('select2_' . $hash, $data, 600);
+        Cache::add('select2_' . $hash, $data, 6000);
 
         return $hash;
     }
index fc6cbf83dcf6924ddb55d5580b92f54f38fe47c7..d1d7b5105c625ebcff648225b165fc2f0e11a4d5 100644 (file)
@@ -4,5 +4,15 @@ namespace Cubist\Backpack\Magic\Fields;
 
 class StandardFile extends Field
 {
+
     protected $_adminType = 'upload';
+    protected $_disk = 'uploads';
+
+    protected function getFieldAttributes()
+    {
+        $res = parent::getFieldAttributes();
+        $res['upload'] = true;
+        $res['disk'] = $this->_disk;
+        return $res;
+    }
 }