summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/AppInfo
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-15 11:37:55 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-03-17 14:45:56 +0100
commit51d228932fe6adbd29bdfe8c52d71ba03bf82069 (patch)
treeb06e25b1f459c0ce898a15e62e6735c2d4d2af26 /apps/files_trashbin/lib/AppInfo
parent04a4562a01e3594797ff4179769f3f9a45c3d9d2 (diff)
downloadnextcloud-server-51d228932fe6adbd29bdfe8c52d71ba03bf82069.tar.gz
nextcloud-server-51d228932fe6adbd29bdfe8c52d71ba03bf82069.zip
Add trashbin migrator to export and import trashbin data
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_trashbin/lib/AppInfo')
-rw-r--r--apps/files_trashbin/lib/AppInfo/Application.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/files_trashbin/lib/AppInfo/Application.php b/apps/files_trashbin/lib/AppInfo/Application.php
index 5f56b9ba1ea..41466a865ac 100644
--- a/apps/files_trashbin/lib/AppInfo/Application.php
+++ b/apps/files_trashbin/lib/AppInfo/Application.php
@@ -30,17 +30,20 @@ use OCA\Files_Trashbin\Capabilities;
use OCA\Files_Trashbin\Expiration;
use OCA\Files_Trashbin\Trash\ITrashManager;
use OCA\Files_Trashbin\Trash\TrashManager;
-use OCP\App\IAppManager;
+use OCA\Files_Trashbin\UserMigration\TrashbinMigrator;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
+use OCP\App\IAppManager;
use OCP\ILogger;
use OCP\IServerContainer;
class Application extends App implements IBootstrap {
+ public const APP_ID = 'files_trashbin';
+
public function __construct(array $urlParams = []) {
- parent::__construct('files_trashbin', $urlParams);
+ parent::__construct(self::APP_ID, $urlParams);
}
public function register(IRegistrationContext $context): void {
@@ -50,6 +53,8 @@ class Application extends App implements IBootstrap {
$context->registerServiceAlias(ITrashManager::class, TrashManager::class);
/** Register $principalBackend for the DAV collection */
$context->registerServiceAlias('principalBackend', Principal::class);
+
+ $context->registerUserMigrator(TrashbinMigrator::class);
}
public function boot(IBootContext $context): void {
@@ -65,10 +70,10 @@ class Application extends App implements IBootstrap {
\OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Files_Trashbin\Trashbin', 'ensureFileScannedHook');
\OCA\Files\App::getNavigationManager()->add(function () {
- $l = \OC::$server->getL10N('files_trashbin');
+ $l = \OC::$server->getL10N(self::APP_ID);
return [
'id' => 'trashbin',
- 'appname' => 'files_trashbin',
+ 'appname' => self::APP_ID,
'script' => 'list.php',
'order' => 50,
'name' => $l->t('Deleted files'),