diff options
author | Christopher Ng <chrng8@gmail.com> | 2024-04-11 17:39:59 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2024-04-23 16:20:41 -0700 |
commit | caed644c03c3bbaff59135705f47be392402401c (patch) | |
tree | 96c0528f15839ed58a32d3c7549352feac52a408 /apps/files_trashbin/lib/UserMigration | |
parent | b41834fb8d53e2a7d81247046731f398a80dcb1b (diff) | |
download | nextcloud-server-caed644c03c3bbaff59135705f47be392402401c.tar.gz nextcloud-server-caed644c03c3bbaff59135705f47be392402401c.zip |
chore(trashbin): Add method to get deleted by from trash item
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files_trashbin/lib/UserMigration')
-rw-r--r-- | apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php b/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php index 971d2a7d60b..5b3be5aead6 100644 --- a/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php +++ b/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php @@ -96,7 +96,15 @@ class TrashbinMigrator implements IMigrator, ISizeEstimationMigrator { } $output->writeln("Exporting trashbin files…"); $exportDestination->copyFolder($trashbinFolder, static::PATH_FILES_FOLDER); - $originalLocations = \OCA\Files_Trashbin\Trashbin::getLocations($uid); + $originalLocations = []; + // TODO Export all extra data and bump migrator to v2 + foreach (\OCA\Files_Trashbin\Trashbin::getExtraData($uid) as $filename => $extraData) { + $locationData = []; + foreach ($extraData as $timestamp => ['location' => $location]) { + $locationData[$timestamp] = $location; + } + $originalLocations[$filename] = $locationData; + } $exportDestination->addFileContents(static::PATH_LOCATIONS_FILE, json_encode($originalLocations)); } catch (NotFoundException $e) { $output->writeln("No trashbin to export…"); |