Fixed issue with file field in collections that caused unexpected duplication of items (fixes #775)

This commit is contained in:
Djamil Legato
2016-09-30 21:55:49 -07:00
parent 74b6b1edd8
commit a011368e40
2 changed files with 2 additions and 1 deletions

View File

@@ -15,6 +15,7 @@
* Fixed UI for Pagemedia note when files cannot yet be uploaded ([#798](https://github.com/getgrav/grav-plugin-admin/issues/798))
* Fixed Submit buttons getting disabled in case of form invalidity disallowing to submit again ([#802](https://github.com/getgrav/grav-plugin-admin/issues/802))
* Fixed issue when reading the file size setting if set to `0` (in Pagemedia and File fields)
* Fixed issue with `file` field in collections that caused unexpected duplication of items ([#775](https://github.com/getgrav/grav-plugin-admin/issues/775))
# v1.2.2
## 09/08/2016

View File

@@ -1937,7 +1937,7 @@ class AdminController
$new_data = $files;
}
if (isset($data['header'][$init_key])) {
$obj->modifyHeader($init_key, array_merge([], $data['header'][$init_key], $new_data));
$obj->modifyHeader($init_key, array_replace_recursive([], $data['header'][$init_key], $new_data));
} else {
$obj->modifyHeader($init_key, $new_data);
}