summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-18 13:14:48 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-09 15:41:06 +0100
commitcbb7934fb3ad69e84bf8b1bbe310ee2700e778a3 (patch)
tree79dd95b8c9173230ab1759d9a27a87ec99873545 /apps/files/appinfo
parent4659bf9b4a880376e690d3ca52e855a861c143f1 (diff)
downloadnextcloud-server-cbb7934fb3ad69e84bf8b1bbe310ee2700e778a3.tar.gz
nextcloud-server-cbb7934fb3ad69e84bf8b1bbe310ee2700e778a3.zip
Introduce console command to transfer ownerships of files - refs #19154
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/register_command.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/files/appinfo/register_command.php b/apps/files/appinfo/register_command.php
index 4aaf49df9e2..f170367f10c 100644
--- a/apps/files/appinfo/register_command.php
+++ b/apps/files/appinfo/register_command.php
@@ -21,5 +21,12 @@
*
*/
-$application->add(new OCA\Files\Command\Scan(\OC::$server->getUserManager()));
-$application->add(new OCA\Files\Command\DeleteOrphanedFiles(\OC::$server->getDatabaseConnection()));
+$dbConnection = \OC::$server->getDatabaseConnection();
+$userManager = OC::$server->getUserManager();
+$shareManager = \OC::$server->getShareManager();
+$rootFolder = \OC::$server->getRootFolder();
+
+/** @var Symfony\Component\Console\Application $application */
+$application->add(new OCA\Files\Command\Scan($userManager));
+$application->add(new OCA\Files\Command\DeleteOrphanedFiles($dbConnection));
+$application->add(new OCA\Files\Command\TransferOwnership($userManager, $shareManager, $rootFolder));