Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Extend files migrator
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Apr 8, 2022
commit 2b5cf5c67094494487356bd3d2b4656d9d5283a5
29 changes: 28 additions & 1 deletion lib/Migrator/FilesMigrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\IL10N;
use OCP\ITagManager;
use OCP\IUser;
use OCP\SystemTag\ISystemTagManager;
Expand Down Expand Up @@ -66,18 +67,22 @@ class FilesMigrator implements IMigrator {

protected ICommentsManager $commentsManager;

protected IL10N $l10n;

public function __construct(
IRootFolder $rootFolder,
ITagManager $tagManager,
ISystemTagManager $systemTagManager,
ISystemTagObjectMapper $systemTagMapper,
ICommentsManager $commentsManager
ICommentsManager $commentsManager,
IL10N $l10n
) {
$this->root = $rootFolder;
$this->tagManager = $tagManager;
$this->systemTagManager = $systemTagManager;
$this->systemTagMapper = $systemTagMapper;
$this->commentsManager = $commentsManager;
$this->l10n = $l10n;
}

/**
Expand Down Expand Up @@ -266,4 +271,26 @@ public function import(
}
}
}

/**
* {@inheritDoc}
*/
public function getId(): string {
return 'files';
}

/**
* {@inheritDoc}
*/
public function getDisplayName(): string {
return $this->l10n->t('Files');
}

/**
* {@inheritDoc}
*/
public function getDescription(): string {
// TODO handle migrator dependency resoluton as TrashbinMigrator is dependent on FilesMigrator
return $this->l10n->t('Files including deleted files, versions, comments, collaborative tags, and favorites');
}
}