SF.net SVN: postfixadmin:[1445] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2013-03-23 19:32:52
|
Revision: 1445 http://sourceforge.net/p/postfixadmin/code/1445 Author: christian_boltz Date: 2013-03-23 19:32:48 +0000 (Sat, 23 Mar 2013) Log Message: ----------- functions.inc.php - allowed_quota: if $CONF[quota] == NO, just return 0 (unlimited) list-virtual.php: - only eval_size($limit['maxquota']) if $CONF[quota] == YES ($limit['maxquota'] is not set if $CONF[quota] == NO) Both issues (which caused PHP warnings) were found by TigerP on IRC Modified Paths: -------------- trunk/functions.inc.php trunk/list-virtual.php Modified: trunk/functions.inc.php =================================================================== --- trunk/functions.inc.php 2013-03-14 23:17:57 UTC (rev 1444) +++ trunk/functions.inc.php 2013-03-23 19:32:48 UTC (rev 1445) @@ -648,6 +648,10 @@ * @return Integer allowed maximum quota (in MB) */ function allowed_quota($domain, $current_user_quota) { + if ( !boolconf('quota') ) { + return 0; # quota disabled means no limits - no need for more checks + } + $domain_properties = get_domain_properties($domain); $tMaxquota = $domain_properties['maxquota']; Modified: trunk/list-virtual.php =================================================================== --- trunk/list-virtual.php 2013-03-14 23:17:57 UTC (rev 1444) +++ trunk/list-virtual.php 2013-03-23 19:32:48 UTC (rev 1445) @@ -288,7 +288,9 @@ $limit ['aliases'] = eval_size ($limit ['aliases']); $limit ['mailboxes'] = eval_size ($limit ['mailboxes']); - $limit ['maxquota'] = eval_size ($limit ['maxquota']); + if (boolconf('quota')) { + $limit ['maxquota'] = eval_size ($limit ['maxquota']); + } } $gen_show_status = array (); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |