diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-02-25 16:12:44 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-02-25 16:12:44 +0100 |
commit | b917646516b7a5756992f6606a601efc480d0872 (patch) | |
tree | 6b737d40ef68d6f8f5d584a7724d5b82b7bbcc22 /apps/files_versions/lib | |
parent | 272f854ce685f3f44312fd4cb15858bbbd993276 (diff) | |
download | nextcloud-server-b917646516b7a5756992f6606a601efc480d0872.tar.gz nextcloud-server-b917646516b7a5756992f6606a601efc480d0872.zip |
fix quota calculation
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r-- | apps/files_versions/lib/versions.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 05c1bf53e43..778fefd8a72 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -350,12 +350,14 @@ class Storage { $versions_fileview = new \OC\Files\View('/'.$uid.'/files_versions'); // get available disk space for user - $quota = \OCP\Util::computerFileSize(\OC_Preferences::getValue($uid, 'files', 'quota')); - if ( $quota == null ) { - $quota = \OCP\Util::computerFileSize(\OC_Appconfig::getValue('files', 'default_quota')); + $quota = \OC_Preferences::getValue($uid, 'files', 'quota'); + if ( $quota === null ) { + $quota = \OC_Appconfig::getValue('files', 'default_quota'); } - if ( $quota == null ) { + if ( $quota === null ) { $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 |