aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage/Browser.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-06-13 21:06:56 -0700
committerzotlabs <mike@macgirvin.com>2018-06-13 21:06:56 -0700
commit8da0f9d3569e7c19e5581c4d402931a07dcab317 (patch)
treedf8b90874817c61ff2683aa814c58161deeb54b5 /Zotlabs/Storage/Browser.php
parentb5e4a5f51c478d646248c5a9eb22907cda32dd3e (diff)
downloadvolse-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.php4
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)
);