found out that the 'Config' class is too static - it shares its static
data with the 'Lang' child class.
This caused a conflict because we have $CONF[transport] and
$PALANG[transport], and Config::read('transport') returned the $PALANG
text.
To fix this, all texts are now stored as $CONF[__LANG].
I also dropped the 'Lang' class.
model/Config.php:
- mark the 'Config' class as final to ensure we don't trap into the
"too static" problem again.
- bool(): display and log an error message if a $CONF option does not
contain YES or NO (that would have uncovered this bug much earlier)
- add lang() and lang_f() wrapper functions to get $PALANG texts
- remove unused $__cache and $__objects
model/Lang.php:
- deleted
common.php:
- store $PALANG as $CONF[__LANG]
lots of files:
- replace Lang::read() and Lang::read_f() calls with Config::lang()
and Config::lang_f()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1536 a1433add-5e2c-0410-b055-b7f2511e0802
- 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
- add read_f() - similar to read(), but accepts a second parameter which
is then included in the text using sprintf
- bool(): change parameter name
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1471 a1433add-5e2c-0410-b055-b7f2511e0802
- move boolconf() to Config::bool()
boolconf() will stay for backwards compability, but new code
should use Config::bool()
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1467 a1433add-5e2c-0410-b055-b7f2511e0802
Class Lang uses exactly the same code as Class Config - therefore
I replaced its code with a simple "extends Config".
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1212 a1433add-5e2c-0410-b055-b7f2511e0802