change : removed "/setmetadatas" from route, the http verb "PATCH" on "record" entity is ok

fix : unknown field now throws exception (no more erase all...)
add : set "base_id":x to change collection
cleanup : removed unused parm to recordadapter::move_to_collection()
This commit is contained in:
jygaulier
2020-06-22 14:40:27 +02:00
parent 013c0c8dac
commit 18f7a658ed
8 changed files with 34 additions and 23 deletions

View File

@@ -115,13 +115,13 @@ class MoveCollectionController extends Controller
foreach ($records as $record) {
$oldCollectionId = $record->getCollection()->get_coll_id();
$record->move_to_collection($collection, $this->getApplicationBox());
$record->move_to_collection($collection);
if ($request->request->get("chg_coll_son") == "1") {
/** @var \record_adapter $child */
foreach ($record->getChildren() as $child) {
if ($this->getAclForUser()->has_right_on_base($child->getBaseId(), \ACL::CANDELETERECORD)) {
$child->move_to_collection($collection, $this->getApplicationBox());
$child->move_to_collection($collection);
}
}
}