summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/command
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-12-10 11:21:28 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-12-10 11:21:28 +0100
commitfb87441fd9c3ff8300c03966a977573601450ad2 (patch)
tree673a2981c8e5a6a136f81846fbe9a5c89fd7076b /apps/files_versions/command
parent75c3d646350d03d113ba6565603ce77d1226cef3 (diff)
downloadnextcloud-server-fb87441fd9c3ff8300c03966a977573601450ad2.tar.gz
nextcloud-server-fb87441fd9c3ff8300c03966a977573601450ad2.zip
Deduplicate version expire jobs
* versionSize is calculated anyway in the expire job - > dropped * offset/neededSpace was needed for expiry before the file is moved to the versions -> now this is included already in the currently used space because the expiry job is defered to a point in time after the version creation * fixes #21108
Diffstat (limited to 'apps/files_versions/command')
-rw-r--r--apps/files_versions/command/expire.php18
1 files changed, 2 insertions, 16 deletions
diff --git a/apps/files_versions/command/expire.php b/apps/files_versions/command/expire.php
index 5db33f38772..88723690603 100644
--- a/apps/files_versions/command/expire.php
+++ b/apps/files_versions/command/expire.php
@@ -35,16 +35,6 @@ class Expire implements ICommand {
private $fileName;
/**
- * @var int|null
- */
- private $versionsSize;
-
- /**
- * @var int
- */
- private $neededSpace = 0;
-
- /**
* @var string
*/
private $user;
@@ -52,14 +42,10 @@ class Expire implements ICommand {
/**
* @param string $user
* @param string $fileName
- * @param int|null $versionsSize
- * @param int $neededSpace
*/
- function __construct($user, $fileName, $versionsSize = null, $neededSpace = 0) {
+ function __construct($user, $fileName) {
$this->user = $user;
$this->fileName = $fileName;
- $this->versionsSize = $versionsSize;
- $this->neededSpace = $neededSpace;
}
@@ -71,7 +57,7 @@ class Expire implements ICommand {
}
\OC_Util::setupFS($this->user);
- Storage::expire($this->fileName, $this->versionsSize, $this->neededSpace);
+ Storage::expire($this->fileName);
\OC_Util::tearDownFS();
}
}