Skip to content
Snippets Groups Projects
Commit a402dcfe authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #13243 TIME 1:20 migrate folders with keyword

parent fdb8a8b5
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,6 @@ foreach ($customs as $custom) {
'level' => 0
]);
$GLOBALS['entities'] = \Entity\models\EntityModel::get(['select' => ['id']]);
fillEntities($masterFolderId);
foreach ($fileplans as $fileplan) {
......@@ -151,13 +150,12 @@ function runPositionsForPrivate($positions, $parentPositionId, $parentFolderId,
function fillEntities($folderId)
{
foreach ($GLOBALS['entities'] as $entity) {
\Folder\models\EntityFolderModel::create([
'folder_id' => $folderId,
'entity_id' => $entity['id'],
'edition' => true,
]);
}
\Folder\models\EntityFolderModel::create([
'folder_id' => $folderId,
'entity_id' => null,
'edition' => true,
'keyword' => 'ALL_ENTITIES'
]);
}
function fillResources($folderId, $positionId)
......
......@@ -38,7 +38,6 @@ foreach ($customs as $custom) {
'level' => 0
]);
$GLOBALS['entities'] = \Entity\models\EntityModel::get(['select' => ['id']]);
fillEntities($masterFolderId);
$aFolderIdMap = [];
......@@ -92,13 +91,12 @@ foreach ($customs as $custom) {
function fillEntities($folderId)
{
foreach ($GLOBALS['entities'] as $entity) {
\Folder\models\EntityFolderModel::create([
'folder_id' => $folderId,
'entity_id' => $entity['id'],
'edition' => true,
]);
}
\Folder\models\EntityFolderModel::create([
'folder_id' => $folderId,
'entity_id' => null,
'edition' => true,
'keyword' => 'ALL_ENTITIES'
]);
}
function fillResources($folderId, $folderSystemId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment