merge master in prod

This commit is contained in:
2020-09-08 12:00:45 +02:00
parent b925edaa9e
commit 3e5e731c2c
226 changed files with 8516 additions and 4149 deletions
@@ -325,7 +325,7 @@ class AdminBaseController
}
$isMime = strstr($type, '/');
$find = str_replace(['.', '*'], ['\.', '.*'], $type);
$find = str_replace(['.', '*', '+'], ['\.', '.*', '\+'], $type);
if ($isMime) {
$match = preg_match('#' . $find . '$#', $mime);
@@ -737,8 +737,8 @@ class AdminBaseController
// Process previously uploaded files for the current URI
// and finally store them. Everything else will get discarded
$queue = $this->admin->session()->getFlashObject('files-upload');
$queue = $queue[base64_encode($this->grav['uri']->url())];
if (is_array($queue)) {
$queue = $queue[base64_encode($this->grav['uri']->url())];
foreach ($queue as $key => $files) {
foreach ($files as $destination => $file) {
if (!rename($file['tmp_name'], $destination)) {
@@ -943,7 +943,7 @@ class AdminBaseController
$settings = (object)$blueprints->schema()->getProperty($field);
} else {
$page = null;
if ($type === 'themes') {
if ($type === 'themes' || $type === 'plugins') {
$obj = $this->grav[$type]->get(Utils::substrToString($blueprint, '/')); //here
$settings = (object) $obj->blueprints()->schema()->getProperty($field);
} else {