]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only call OC_FileCache::get('/Shared') if it exists in the file cache, prevents prema...
authorMichael Gapczynski <GapczynskiM@gmail.com>
Wed, 20 Jun 2012 23:24:07 +0000 (19:24 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Wed, 20 Jun 2012 23:39:17 +0000 (19:39 -0400)
Conflicts:

lib/fileproxy/quota.php

lib/fileproxy/quota.php

index b0c3775b9db80fc1d60bad923c1790f7ac962894..7316224cc6160566f6d629390f0a9021f1d56eb5 100644 (file)
@@ -55,7 +55,12 @@ class OC_FileProxy_Quota extends OC_FileProxy{
         */
        private function getFreeSpace(){
                $rootInfo=OC_FileCache_Cached::get('');
-               $sharedInfo=OC_FileCache_Cached::get('/Shared');
+               // TODO Remove after merge of share_api
+               if (OC_FileCache::inCache('/Shared')) {
+                       $sharedInfo=OC_FileCache_Cached::get('/Shared');
+               } else {
+                       $sharedInfo = null;
+               }
                $usedSpace=isset($rootInfo['size'])?$rootInfo['size']:0;
                $usedSpace=isset($sharedInfo['size'])?$usedSpace-$sharedInfo['size']:$usedSpace;
                $totalSpace=$this->getQuota();