Browse Source

Extend trashbin migrator

Signed-off-by: Christopher Ng <chrng8@gmail.com>
pull/31911/head
Christopher Ng 4 years ago
parent
commit
4750f232eb
  1. 28
      apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php

28
apps/files_trashbin/lib/UserMigration/TrashbinMigrator.php

@ -31,6 +31,7 @@ use OCP\Files\Folder;
use OCP\Files\IRootFolder; use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException; use OCP\Files\NotFoundException;
use OCP\IDBConnection; use OCP\IDBConnection;
use OCP\IL10N;
use OCP\IUser; use OCP\IUser;
use OCP\UserMigration\IExportDestination; use OCP\UserMigration\IExportDestination;
use OCP\UserMigration\IImportSource; use OCP\UserMigration\IImportSource;
@ -50,12 +51,16 @@ class TrashbinMigrator implements IMigrator {
protected IDBConnection $dbc; protected IDBConnection $dbc;
protected IL10N $l10n;
public function __construct( public function __construct(
IRootFolder $rootFolder, IRootFolder $rootFolder,
IDBConnection $dbc
IDBConnection $dbc,
IL10N $l10n
) { ) {
$this->root = $rootFolder; $this->root = $rootFolder;
$this->dbc = $dbc; $this->dbc = $dbc;
$this->l10n = $l10n;
} }
/** /**
@ -134,4 +139,25 @@ class TrashbinMigrator implements IMigrator {
$output->writeln("No trashbin to import…"); $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');
}
} }
Loading…
Cancel
Save