summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-04-08 19:23:12 +0000
committerChristopher Ng <chrng8@gmail.com>2022-04-08 19:31:22 +0000
commit4750f232ebe353108c2547995cdbc656b784acae (patch)
treee3a9bfd69d8572f4f8f532bc30ffaf42bf76123c
parent087b75217ee3231ed2fb4f8693933b0f07232a07 (diff)
downloadnextcloud-server-4750f232ebe353108c2547995cdbc656b784acae.tar.gz
nextcloud-server-4750f232ebe353108c2547995cdbc656b784acae.zip
Extend trashbin migrator
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r--apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php b/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php
index 0aa41c1954f..c7832ec5bc8 100644
--- a/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php
+++ b/apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php
@@ -31,6 +31,7 @@ use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\IDBConnection;
+use OCP\IL10N;
use OCP\IUser;
use OCP\UserMigration\IExportDestination;
use OCP\UserMigration\IImportSource;
@@ -50,12 +51,16 @@ class TrashbinMigrator implements IMigrator {
protected IDBConnection $dbc;
+ protected IL10N $l10n;
+
public function __construct(
IRootFolder $rootFolder,
- IDBConnection $dbc
+ IDBConnection $dbc,
+ IL10N $l10n
) {
$this->root = $rootFolder;
$this->dbc = $dbc;
+ $this->l10n = $l10n;
}
/**
@@ -134,4 +139,25 @@ class TrashbinMigrator implements IMigrator {
$output->writeln("No trashbin to import…");
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getId(): string {
+ return 'trashbin';
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getDisplayName(): string {
+ return $this->l10n->t('Deleted files');
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getDescription(): string {
+ return $this->l10n->t('Deleted files and folders in the trash bin');
+ }
}