aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-11-08 21:35:40 +0100
committerRobin Appelman <icewind@owncloud.com>2012-11-08 21:35:40 +0100
commit46071fed80c7375edf4788578776a6b313b6dca3 (patch)
treeeeddf5ba7c213966e9972c0788d3d76f5acb2e2b
parentd4858527c2fae4b58c5a9bc1c3aae9ada0ee7b24 (diff)
downloadnextcloud-server-46071fed80c7375edf4788578776a6b313b6dca3.tar.gz
nextcloud-server-46071fed80c7375edf4788578776a6b313b6dca3.zip
fix quota proxy
-rw-r--r--lib/fileproxy/quota.php12
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) {