Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-03-04 15:33:47 +0400
committerBjörn Schießle <bjoern@schiessle.org>2013-03-04 15:33:47 +0400
commit05aad21b996a15a0d21e4437f90f6f7e97dbfac5 (patch)
tree9b3147b8dd6ee6d406fe78273674a17067ef4a5d /apps
parent310edb450c1d4b1d3dfbdae2bed1855185de037f (diff)
parent21bad1fcc08a5d8a765bebcdf03ce169b649b6de (diff)
Merge pull request #2070 from owncloud/fix_quota
fix quota calculation for trash and versions
Diffstat (limited to 'apps')
-rw-r--r--apps/files_trashbin/lib/trash.php2
-rw-r--r--apps/files_versions/lib/versions.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php
index 6dedd314cf2..4b7e9abd92d 100644
--- a/apps/files_trashbin/lib/trash.php
+++ b/apps/files_trashbin/lib/trash.php
@@ -108,7 +108,7 @@ class Trashbin {
if ( $quota === null || $quota === 'default') {
$quota = \OC_Appconfig::getValue('files', 'default_quota');
}
- if ( $quota === null ) {
+ if ( $quota === null || $quota === 'none' ) {
$quota = \OC\Files\Filesystem::free_space('/') / count(\OCP\User::getUsers());
} else {
$quota = \OCP\Util::computerFileSize($quota);
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php
index 6ee307c7e17..d3ebd5ade91 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 || $quota === '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);