1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-07-15 01:34:16 +02:00

finalizing disk usage rework

- changed dockerapi to not return human readable values for df
- all caluclations now in KiB
- moved code from domain_admin to mailbox functions
- using actual occupied bytes as used quota
- all outputs now in *iB using formatBytes()
This commit is contained in:
heavygale
2019-10-01 20:27:06 +02:00
parent 7c2a5ba37e
commit ecda554e53
4 changed files with 28 additions and 36 deletions

View File

@ -444,18 +444,5 @@ function domain_admin($_action, $_data = null) {
return $domainadmindata;
break;
case 'total_quota':
if ($_SESSION['mailcow_cc_role'] != "admin") {
$_SESSION['return'][] = array(
'type' => 'danger',
'log' => array(__FUNCTION__, $_action, $_data_log),
'msg' => 'access_denied'
);
return false;
}
$stmt = $pdo->query("SELECT SUM(`quota`) AS `quota` FROM `domain` WHERE `active`=1");
$row = $stmt->fetch(PDO::FETCH_ASSOC);
return $row['quota'];
break;
}
}