1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-08-06 06:42:37 +03:00

functions.inc.php:

- check_quota(): whitespace changes only


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1066 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz
2011-05-31 22:52:51 +00:00
parent 62261f54ae
commit 9a1317edc9

View File

@@ -683,27 +683,21 @@ function check_quota ($quota, $domain, $username="") {
$rval = false;
$limit = get_domain_properties ($domain);
if ($limit['maxquota'] == 0)
{
if ($limit['maxquota'] == 0) {
$rval = true; # maxquota unlimited -> OK, but domain level quota could still be hit
}
if (($limit['maxquota'] < 0) and ($quota < 0))
{
if (($limit['maxquota'] < 0) and ($quota < 0)) {
return true; # maxquota and $quota are both disabled -> OK, no need for more checks
}
if (($limit['maxquota'] > 0) and ($quota == 0))
{
if (($limit['maxquota'] > 0) and ($quota == 0)) {
return false; # mailbox with unlimited quota on a domain with maxquota restriction -> not allowed, no more checks needed
}
if ($limit['maxquota'] != 0 && $quota > $limit['maxquota'])
{
if ($limit['maxquota'] != 0 && $quota > $limit['maxquota']) {
return false; # mailbox bigger than maxquota restriction (and maxquota != unlimited) -> not allowed, no more checks needed
}
else
{
} else {
$rval = true; # mailbox size looks OK, but domain level quota could still be hit
}