| @@ 56-58 (lines=3) @@ | ||
| 53 | ||
| 54 | foreach ($entries as $entry) { |
|
| 55 | if ($entry->getName() === $name) { |
|
| 56 | if ($entry->getType() === FileInfo::TYPE_FOLDER) { |
|
| 57 | return new TrashFolderFolder($this->getName(), $this->userId, $entry, $this->getOriginalLocation()); |
|
| 58 | } |
|
| 59 | return new TrashFolderFile($this->getName(), $this->userId, $entry, $this->getOriginalLocation()); |
|
| 60 | } |
|
| 61 | } |
|
| @@ 70-72 (lines=3) @@ | ||
| 67 | $entries = \OCA\Files_Trashbin\Helper::getTrashFiles($this->getName(), $this->userId); |
|
| 68 | ||
| 69 | $children = array_map(function (FileInfo $entry) { |
|
| 70 | if ($entry->getType() === FileInfo::TYPE_FOLDER) { |
|
| 71 | return new TrashFolderFolder($this->getName(), $this->userId, $entry, $this->getOriginalLocation()); |
|
| 72 | } |
|
| 73 | return new TrashFolderFile($this->getName(), $this->userId, $entry, $this->getOriginalLocation()); |
|
| 74 | }, $entries); |
|
| 75 | ||
| @@ 68-70 (lines=3) @@ | ||
| 65 | ||
| 66 | foreach ($entries as $entry) { |
|
| 67 | if ($entry->getName() === $name) { |
|
| 68 | if ($entry->getType() === FileInfo::TYPE_FOLDER) { |
|
| 69 | return new TrashFolderFolder($this->root . '/' . $this->getName(), $this->userId, $entry, $this->getOriginalLocation()); |
|
| 70 | } |
|
| 71 | return new TrashFolderFile($this->root . '/' . $this->getName(), $this->userId, $entry, $this->getOriginalLocation()); |
|
| 72 | } |
|
| 73 | } |
|
| @@ 82-84 (lines=3) @@ | ||
| 79 | $entries = \OCA\Files_Trashbin\Helper::getTrashFiles($this->root . '/' . $this->getName(), $this->userId); |
|
| 80 | ||
| 81 | $children = array_map(function (FileInfo $entry) { |
|
| 82 | if ($entry->getType() === FileInfo::TYPE_FOLDER) { |
|
| 83 | return new TrashFolderFolder($this->root.'/'.$this->getName(), $this->userId, $entry, $this->getOriginalLocation()); |
|
| 84 | } |
|
| 85 | return new TrashFolderFile($this->root.'/'.$this->getName(), $this->userId, $entry, $this->getOriginalLocation()); |
|
| 86 | }, $entries); |
|
| 87 | ||