diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-03-26 17:11:34 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-03-26 17:11:34 +0100 |
commit | 1969c8d5c806f74dee7bc90f9bb15422b5930fb8 (patch) | |
tree | 2981d4925bc5ff663c2cae412c4bf0422dc847e4 /apps/files_versions | |
parent | 8c903c100ff6517806e5328ef56d615f5c93490b (diff) | |
download | nextcloud-server-1969c8d5c806f74dee7bc90f9bb15422b5930fb8.tar.gz nextcloud-server-1969c8d5c806f74dee7bc90f9bb15422b5930fb8.zip |
save uid instead of user object in command
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/command/expire.php | 8 | ||||
-rw-r--r-- | apps/files_versions/lib/storage.php | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_versions/command/expire.php b/apps/files_versions/command/expire.php index a934b0f7159..fe596d37543 100644 --- a/apps/files_versions/command/expire.php +++ b/apps/files_versions/command/expire.php @@ -32,17 +32,17 @@ class Expire implements ICommand { private $neededSpace = 0; /** - * @var int + * @var string */ private $user; /** - * @param IUser $user + * @param string $user * @param string $fileName * @param int|null $versionsSize * @param int $neededSpace */ - function __construct(IUser $user, $fileName, $versionsSize = null, $neededSpace = 0) { + function __construct($user, $fileName, $versionsSize = null, $neededSpace = 0) { $this->user = $user; $this->fileName = $fileName; $this->versionsSize = $versionsSize; @@ -51,7 +51,7 @@ class Expire implements ICommand { public function handle() { - $this->setupFS($this->user); + \OC_Util::setupFS($this->user); Storage::expire($this->fileName, $this->versionsSize, $this->neededSpace); } } diff --git a/apps/files_versions/lib/storage.php b/apps/files_versions/lib/storage.php index 34ed812f4bb..3cf8522916a 100644 --- a/apps/files_versions/lib/storage.php +++ b/apps/files_versions/lib/storage.php @@ -483,7 +483,7 @@ class Storage { * @param int $neededSpace */ private static function scheduleExpire($fileName, $versionsSize = null, $neededSpace = 0) { - $command = new Expire(\OC::$server->getUserSession()->getUser(), $fileName, $versionsSize, $neededSpace); + $command = new Expire(\OC::$server->getUserSession()->getUser()->getUID(), $fileName, $versionsSize, $neededSpace); \OC::$server->getCommandBus()->push($command); } |