Remove special case of media now that we have types nested under media.types

This commit is contained in:
Flavio Copes
2016-06-03 10:23:50 +02:00
parent 96562e5692
commit c59a8c355f

View File

@@ -328,13 +328,7 @@ class Admin
$type = preg_replace('|config/|', '', $type);
$blueprints = $this->blueprints("config/{$type}");
$config = $this->grav['config'];
if ($type === 'media' && count($post)) {
$obj = new Data\Data([], $blueprints); // saving
} else {
$obj = new Data\Data($config->get($type, []), $blueprints);
}
$obj = new Data\Data($config->get($type, []), $blueprints);
$obj->merge($post);
// FIXME: We shouldn't allow user to change configuration files in system folder!