|
@@ -136,13 +136,17 @@ class VersionFileTreeByObjectService {
|
|
|
|
|
|
$this->fileIds = explode(",", $containerContent->files);
|
|
$this->fileIds = explode(",", $containerContent->files);
|
|
|
|
|
|
- if ($this->fileIds) {
|
|
|
|
- $containerFolders = File::query()->whereIn("id", $this->fileIds)->pluck("folder_id")->filter()->unique();
|
|
|
|
-
|
|
|
|
- Folder::query()->whereIn("id", $containerFolders->toArray())->pluck("path")->each(function ($item) {
|
|
|
|
|
|
+ Folder::query()->where("object_type", "container")->where("object_id",$containerContent->container_id)->pluck("path")->each(function ($item) {
|
|
$this->folderIds = [...$this->folderIds, ...explode(",", trim($item, ","))];
|
|
$this->folderIds = [...$this->folderIds, ...explode(",", trim($item, ","))];
|
|
- });
|
|
|
|
- }
|
|
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+// if ($this->fileIds) {
|
|
|
|
+// $containerFolders = File::query()->whereIn("id", $this->fileIds)->pluck("folder_id")->filter()->unique();
|
|
|
|
+//
|
|
|
|
+// Folder::query()->whereIn("id", $containerFolders->toArray())->pluck("path")->each(function ($item) {
|
|
|
|
+// $this->folderIds = [...$this->folderIds, ...explode(",", trim($item, ","))];
|
|
|
|
+// });
|
|
|
|
+// }
|
|
|
|
|
|
if (! $this->objectVersion) {
|
|
if (! $this->objectVersion) {
|
|
$this->objectVersion = $this->object->version;
|
|
$this->objectVersion = $this->object->version;
|