Skip to content

Commit 6ce0647

Browse files
authored
Merge pull request #76 from nextcloud/enh/extend-files-migrator
Extend files migrator
2 parents cc33d2a + 2b5cf5c commit 6ce0647

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

lib/Migrator/FilesMigrator.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
use OCP\Files\Folder;
3636
use OCP\Files\IRootFolder;
3737
use OCP\Files\NotFoundException;
38+
use OCP\IL10N;
3839
use OCP\ITagManager;
3940
use OCP\IUser;
4041
use OCP\SystemTag\ISystemTagManager;
@@ -66,18 +67,22 @@ class FilesMigrator implements IMigrator {
6667

6768
protected ICommentsManager $commentsManager;
6869

70+
protected IL10N $l10n;
71+
6972
public function __construct(
7073
IRootFolder $rootFolder,
7174
ITagManager $tagManager,
7275
ISystemTagManager $systemTagManager,
7376
ISystemTagObjectMapper $systemTagMapper,
74-
ICommentsManager $commentsManager
77+
ICommentsManager $commentsManager,
78+
IL10N $l10n
7579
) {
7680
$this->root = $rootFolder;
7781
$this->tagManager = $tagManager;
7882
$this->systemTagManager = $systemTagManager;
7983
$this->systemTagMapper = $systemTagMapper;
8084
$this->commentsManager = $commentsManager;
85+
$this->l10n = $l10n;
8186
}
8287

8388
/**
@@ -266,4 +271,26 @@ public function import(
266271
}
267272
}
268273
}
274+
275+
/**
276+
* {@inheritDoc}
277+
*/
278+
public function getId(): string {
279+
return 'files';
280+
}
281+
282+
/**
283+
* {@inheritDoc}
284+
*/
285+
public function getDisplayName(): string {
286+
return $this->l10n->t('Files');
287+
}
288+
289+
/**
290+
* {@inheritDoc}
291+
*/
292+
public function getDescription(): string {
293+
// TODO handle migrator dependency resoluton as TrashbinMigrator is dependent on FilesMigrator
294+
return $this->l10n->t('Files including deleted files, versions, comments, collaborative tags, and favorites');
295+
}
269296
}

0 commit comments

Comments
 (0)