summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-03-04 12:17:57 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-03-04 12:17:57 +0100
commit94dab96dba98ad8a26d157c40ff91b5311e4f373 (patch)
tree351bb4d92938a8067c0618d2775927372971e9b5 /apps/files_versions/lib
parent36a1bcb73251e9fade635431f29a336ccb231115 (diff)
downloadnextcloud-server-94dab96dba98ad8a26d157c40ff91b5311e4f373.tar.gz
nextcloud-server-94dab96dba98ad8a26d157c40ff91b5311e4f373.zip
fix quota calculation for trash and versions
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r--apps/files_versions/lib/versions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 6ee307c7e17..4194ebc7418 100644
--- a/apps/files_versions/lib/versions.php
+++ b/apps/files_versions/lib/versions.php
@@ -351,16 +351,16 @@ class Storage {
$versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions');
// get available disk space for user
- $quota = \OC_Preferences::getValue($uid, 'files', 'quota');
- if ( $quota === null ) {
+ $quota = \OC_Preferences::getValue($user, 'files', 'quota');
+ if ( $quota === null || $quota === 'default') {
$quota = \OC_Appconfig::getValue('files', 'default_quota');
}
- if ( $quota === null ) {
+ if ( $quota === null || $quote === 'none' ) {
$quota = \OC\Files\Filesystem::free_space('/') / count(\OCP\User::getUsers());
} else {
$quota = \OCP\Util::computerFileSize($quota);
}
-
+
// make sure that we have the current size of the version history
if ( $versionsSize === null ) {
$versionsSize = self::getVersionsSize($uid);