mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 20:05:53 +01:00
Remove special case of media now that we have types nested under media.types
This commit is contained in:
@@ -328,13 +328,7 @@ class Admin
|
|||||||
$type = preg_replace('|config/|', '', $type);
|
$type = preg_replace('|config/|', '', $type);
|
||||||
$blueprints = $this->blueprints("config/{$type}");
|
$blueprints = $this->blueprints("config/{$type}");
|
||||||
$config = $this->grav['config'];
|
$config = $this->grav['config'];
|
||||||
|
$obj = new Data\Data($config->get($type, []), $blueprints);
|
||||||
if ($type === 'media' && count($post)) {
|
|
||||||
$obj = new Data\Data([], $blueprints); // saving
|
|
||||||
} else {
|
|
||||||
$obj = new Data\Data($config->get($type, []), $blueprints);
|
|
||||||
}
|
|
||||||
|
|
||||||
$obj->merge($post);
|
$obj->merge($post);
|
||||||
|
|
||||||
// FIXME: We shouldn't allow user to change configuration files in system folder!
|
// FIXME: We shouldn't allow user to change configuration files in system folder!
|
||||||
|
|||||||
Reference in New Issue
Block a user