From 7a144b90fb9174eb50e5d53d2f62d6d8d2671353 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 14 Jun 2018 20:40:25 -0700 Subject: re-implement/refactor getQuotaInfo() on DAV storage --- Zotlabs/Storage/Browser.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Storage/Browser.php') diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 67d934783..c2d70b854 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -333,6 +333,7 @@ class Browser extends DAV\Browser\Plugin { $aclselect = null; $lockstate = ''; + $limit = 0; if($this->auth->owner_id) { $channel = channelx_by_n($this->auth->owner_id); @@ -343,10 +344,11 @@ class Browser extends DAV\Browser\Plugin { $aclselect = ((local_channel() == $this->auth->owner_id) ? populate_acl($channel_acl,false, \Zotlabs\Lib\PermissionDescription::fromGlobalPermission('view_storage')) : ''); } + + // Storage and quota for the account (all channels of the owner of this directory)! + $limit = engr_units_to_bytes(service_class_fetch($this->auth->owner_id, 'attach_upload_limit')); } - // Storage and quota for the account (all channels of the owner of this directory)! - $limit = engr_units_to_bytes(service_class_fetch($owner, 'attach_upload_limit')); if((! $limit) && get_config('system','cloud_report_disksize')) { $limit = engr_units_to_bytes(disk_free_space('store')); } -- cgit v1.2.3