Merge pull request #848 from nextcloud/public-link-quota
fix getting quota for public links with quota_include_external_storage
This commit is contained in:
commit
5aaa065d6d
1 changed files with 13 additions and 1 deletions
|
@ -588,7 +588,19 @@ class OC_Helper {
|
||||||
$sourceStorage = $storage->getSourceStorage();
|
$sourceStorage = $storage->getSourceStorage();
|
||||||
}
|
}
|
||||||
if ($includeExtStorage) {
|
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) {
|
if ($quota !== \OCP\Files\FileInfo::SPACE_UNLIMITED) {
|
||||||
// always get free space / total space from root + mount points
|
// always get free space / total space from root + mount points
|
||||||
return self::getGlobalStorageInfo();
|
return self::getGlobalStorageInfo();
|
||||||
|
|
Loading…
Reference in a new issue