summaryrefslogtreecommitdiffstats
path: root/lib/fileproxy
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-26 23:05:02 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-26 23:05:02 +0200
commit6db81afab9d68ccd50c1e164622252e47ae76c2f (patch)
treed4ae92ab7ee21805e52a29e4099daeb4649ca79e /lib/fileproxy
parent4b616764e825022e9394a4cb26af2012276285b4 (diff)
downloadnextcloud-server-6db81afab9d68ccd50c1e164622252e47ae76c2f.tar.gz
nextcloud-server-6db81afab9d68ccd50c1e164622252e47ae76c2f.zip
move some stuff to the new api
Diffstat (limited to 'lib/fileproxy')
-rw-r--r--lib/fileproxy/quota.php12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/fileproxy/quota.php b/lib/fileproxy/quota.php
index d120f309998..cd9a2f4a192 100644
--- a/lib/fileproxy/quota.php
+++ b/lib/fileproxy/quota.php
@@ -57,7 +57,7 @@ class OC_FileProxy_Quota extends OC_FileProxy{
* @return int
*/
private function getFreeSpace($path) {
- $storage=OC_Filesystem::getStorage($path);
+ list($storage,)=\OC\Files\Filesystem::resolvePath($path);
$owner=$storage->getOwner($path);
$totalSpace=$this->getQuota($owner);
@@ -65,13 +65,9 @@ class OC_FileProxy_Quota extends OC_FileProxy{
return 0;
}
- $rootInfo=OC_FileCache::get('', "/".$owner."/files");
- // TODO Remove after merge of share_api
- if (OC_FileCache::inCache('/Shared', "/".$owner."/files")) {
- $sharedInfo=OC_FileCache::get('/Shared', "/".$owner."/files");
- } else {
- $sharedInfo = null;
- }
+ $view = new \OC\Files\View("/".$owner."/files");
+
+ $rootInfo=$view->getFileInfo('/');
$usedSpace=isset($rootInfo['size'])?$rootInfo['size']:0;
$usedSpace=isset($sharedInfo['size'])?$usedSpace-$sharedInfo['size']:$usedSpace;
return $totalSpace-$usedSpace;