diff options
author | zotlabs <mike@macgirvin.com> | 2018-06-13 21:06:56 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-06-13 21:06:56 -0700 |
commit | 8da0f9d3569e7c19e5581c4d402931a07dcab317 (patch) | |
tree | df8b90874817c61ff2683aa814c58161deeb54b5 /Zotlabs/Storage/Browser.php | |
parent | b5e4a5f51c478d646248c5a9eb22907cda32dd3e (diff) | |
download | volse-hubzilla-8da0f9d3569e7c19e5581c4d402931a07dcab317.tar.gz volse-hubzilla-8da0f9d3569e7c19e5581c4d402931a07dcab317.tar.bz2 volse-hubzilla-8da0f9d3569e7c19e5581c4d402931a07dcab317.zip |
optionally report total available space when uploading
Diffstat (limited to 'Zotlabs/Storage/Browser.php')
-rw-r--r-- | Zotlabs/Storage/Browser.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 153016da6..67d934783 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -347,6 +347,10 @@ class Browser extends DAV\Browser\Plugin { // 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')); + } + $r = q("SELECT SUM(filesize) AS total FROM attach WHERE aid = %d", intval($this->auth->channel_account_id) ); |