Config.php:

- add intbool() - similar to bool(), but returns 1/0 instead of true/false

DomainHandler.php
- initStruct(): use Config::intbool() instead of boolconf()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1473 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 12 years ago
parent 68ae542817
commit 21494f2a14

@ -158,6 +158,14 @@ class Config {
}
}
/**
* Used to read Config::$var, converted to bool, returned as integer (0 or 1)
* @see bool()
*/
public static function intbool($var) {
return Config::bool($var) ? 1 : 0;
}
function getAll() {

@ -27,9 +27,9 @@ class DomainHandler extends PFAHandler {
# TODO: shorter PALANG labels ;-)
# TODO: hardcode 'default' to Config::read in pacol()?
$transp = boolconf('transport') ? 1 : 0; # TOOD: use a function or write a Config::intbool function
$quota = boolconf('quota') ? 1 : 0; # TOOD: use a function or write a Config::intbool function
$dom_q = boolconf('domain_quota') ? 1 : 0; # TOOD: use a function or write a Config::intbool function
$transp = Config::intbool('transport');
$quota = Config::intbool('quota');
$dom_q = Config::intbool('domain_quota');
# NOTE: There are dependencies between alias_count, mailbox_count and total_quota.
# NOTE: If you disable "display in list" for one of them, the SQL query for the others might break.

Loading…
Cancel
Save