]> source.dussan.org Git - nextcloud-server.git/commitdiff
Merge pull request #8015 from owncloud/storageinfo-reuse
authorVincent Petry <pvince81@owncloud.com>
Fri, 4 Apr 2014 08:18:02 +0000 (10:18 +0200)
committerVincent Petry <pvince81@owncloud.com>
Fri, 4 Apr 2014 08:18:02 +0000 (10:18 +0200)
Allow reusing FileInfo for getStorageInfo

1  2 
apps/files/index.php

index 7d25c816eb7f8eba91e6ef74e24710b2aa4bbe06,f2c5bd13359b36a3de721f805ec68bb89637bf67..b8ff08c1b05573dadcd74aaeac5dc4d71581f625
@@@ -70,10 -94,10 +70,10 @@@ $config = \OC::$server->getConfig()
  $permissions = $dirInfo->getPermissions();
  
  // information about storage capacities
- $storageInfo=OC_Helper::getStorageInfo($dir);
+ $storageInfo=OC_Helper::getStorageInfo($dir, $dirInfo);
  $freeSpace=$storageInfo['free'];
  $uploadLimit=OCP\Util::uploadLimit();
 -$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
 +$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir, $freeSpace);
  $publicUploadEnabled = $config->getAppValue('core', 'shareapi_allow_public_upload', 'yes');
  // if the encryption app is disabled, than everything is fine (INIT_SUCCESSFUL status code)
  $encryptionInitStatus = 2;