warn if quota exceeds 90% of storage limit

This commit is contained in:
Mario Vavti
2015-10-21 12:52:03 +02:00
parent a33ddf373b
commit 232742a5e6
2 changed files with 2 additions and 2 deletions

View File

@@ -296,7 +296,7 @@ class RedBrowser extends DAV\Browser\Plugin {
$quota['used'] = $used;
$quota['limit'] = $limit;
$quota['desc'] = $quotaDesc;
$quota['warning'] = (($limit && ($limit - $used) < 104857600) ? true : false); // 10485760 bytes = 100MB
$quota['warning'] = ((($limit) && ((round($used / $limit, 1) * 100) >= 90)) ? t('WARNING:') : ''); // 10485760 bytes = 100MB
$output .= replace_macros(get_markup_template('cloud_actionspanel.tpl'), array(
'$folder_header' => t('Create new folder'),