diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-11-08 21:35:40 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-11-08 21:35:40 +0100 |
commit | 46071fed80c7375edf4788578776a6b313b6dca3 (patch) | |
tree | eeddf5ba7c213966e9972c0788d3d76f5acb2e2b | |
parent | d4858527c2fae4b58c5a9bc1c3aae9ada0ee7b24 (diff) | |
download | nextcloud-server-46071fed80c7375edf4788578776a6b313b6dca3.tar.gz nextcloud-server-46071fed80c7375edf4788578776a6b313b6dca3.zip |
fix quota proxy
-rw-r--r-- | lib/fileproxy/quota.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php index b359b9ae023..a8219191bf3 100644 --- a/lib/fileproxy/quota.php +++ b/lib/fileproxy/quota.php @@ -22,7 +22,7 @@ */ /** - * user quota managment + * user quota management */ class OC_FileProxy_Quota extends OC_FileProxy{ @@ -39,10 +39,8 @@ class OC_FileProxy_Quota extends OC_FileProxy{ return $this->userQuota[$user]; } $userQuota=OC_Preferences::getValue($user, 'files', 'quota', 'default'); - $userQuota=OC_Preferences::getValue($user,'files','quota','default'); if($userQuota=='default') { $userQuota=OC_AppConfig::getValue('files', 'default_quota', 'none'); - $userQuota=OC_AppConfig::getValue('files','default_quota','none'); } if($userQuota=='none') { $this->userQuota[$user]=0; @@ -59,8 +57,12 @@ class OC_FileProxy_Quota extends OC_FileProxy{ * @return int */ private function getFreeSpace($path) { - $storage=OC_Filesystem::getStorage($path); - $owner=$storage->getOwner($path); + /** + * @var \OC\Files\Storage\Storage $storage + * @var string $internalPath + */ + list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($path); + $owner=$storage->getOwner($internalPath); $totalSpace=$this->getQuota($owner); if($totalSpace==0) { |