Browse Source

fix getting quota for public links with quota_include_external_storage

tags/v11.0RC2
Robin Appelman 7 years ago
parent
commit
85d3fb76d7
1 changed files with 13 additions and 1 deletions
  1. 13
    1
      lib/private/legacy/helper.php

+ 13
- 1
lib/private/legacy/helper.php View File

@@ -588,7 +588,19 @@ class OC_Helper {
$sourceStorage = $storage->getSourceStorage();
}
if ($includeExtStorage) {
$quota = OC_Util::getUserQuota(\OCP\User::getUser());
if ($storage->instanceOfStorage('\OC\Files\Storage\Home')
|| $storage->instanceOfStorage('\OC\Files\ObjectStore\HomeObjectStoreStorage')
) {
/** @var \OC\Files\Storage\Home $storage */
$user = $storage->getUser();
} else {
$user = \OC::$server->getUserSession()->getUser()->getUID();
}
if ($user) {
$quota = OC_Util::getUserQuota($user);
} else {
$quota = \OCP\Files\FileInfo::SPACE_UNLIMITED;
}
if ($quota !== \OCP\Files\FileInfo::SPACE_UNLIMITED) {
// always get free space / total space from root + mount points
return self::getGlobalStorageInfo();

Loading…
Cancel
Save