aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-08 16:18:15 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-09 15:41:06 +0100
commit10b9bf15f4a428b7455755f1fd2c684b47c3f75c (patch)
tree86c9d98548e86b4f49283c654e83ed7ae5fba6b8 /apps/files
parentcbb7934fb3ad69e84bf8b1bbe310ee2700e778a3 (diff)
downloadnextcloud-server-10b9bf15f4a428b7455755f1fd2c684b47c3f75c.tar.gz
nextcloud-server-10b9bf15f4a428b7455755f1fd2c684b47c3f75c.zip
Set share owner and share initiator on upate as well
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/appinfo/register_command.php3
-rw-r--r--apps/files/command/transferownership.php8
2 files changed, 2 insertions, 9 deletions
diff --git a/apps/files/appinfo/register_command.php b/apps/files/appinfo/register_command.php
index f170367f10c..0ec2fe1a584 100644
--- a/apps/files/appinfo/register_command.php
+++ b/apps/files/appinfo/register_command.php
@@ -24,9 +24,8 @@
$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));
+$application->add(new OCA\Files\Command\TransferOwnership($userManager, $shareManager));
diff --git a/apps/files/command/transferownership.php b/apps/files/command/transferownership.php
index 22fd2db2196..a8d1f4e0346 100644
--- a/apps/files/command/transferownership.php
+++ b/apps/files/command/transferownership.php
@@ -25,7 +25,6 @@ use OC\Files\Filesystem;
use OC\Files\View;
use OCP\Files\FileInfo;
use OCP\Files\Folder;
-use OCP\Files\IRootFolder;
use OCP\IUserManager;
use OCP\Share\IManager;
use OCP\Share\IShare;
@@ -61,13 +60,9 @@ class TransferOwnership extends Command {
/** @var string */
private $finalTarget;
- /** @var IRootFolder */
- private $rootFolder;
-
- public function __construct(IUserManager $userManager, IManager $shareManager, IRootFolder $rootFolder) {
+ public function __construct(IUserManager $userManager, IManager $shareManager) {
$this->userManager = $userManager;
$this->shareManager = $shareManager;
- $this->rootFolder = $rootFolder;
parent::__construct();
}
@@ -208,7 +203,6 @@ class TransferOwnership extends Command {
private function restoreShares(OutputInterface $output) {
$output->writeln("Restoring shares ...");
$progress = new ProgressBar($output, count($this->shares));
- /** @var Folder $sourceRoot */
foreach($this->shares as $share) {
if ($share->getSharedWith() === $this->destinationUser) {