1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-07-29 22:41:11 +03:00

32 Commits

Author SHA1 Message Date
dc51b00ce1 Fix formatting 2024-11-10 22:19:22 +01:00
e1c64f887f reformat code 2024-10-30 19:29:55 +00:00
5de5fb2719 Fix deprecated config parameter error (#859)
add create_mailbox_subdirs to deprecated list - stop error_log() call for it from Config.
see also #812 
Co-authored-by: Sergey Lisenko <lisenkosergey@loc.tashkent.uz>
2024-10-30 15:04:19 +00:00
2d6ded2786 PSR2 -> PSR12 formatting 2022-06-28 13:46:11 +01:00
2edabc3e03 phpcs insists on some brace changes 2021-04-13 21:19:16 +01:00
823f27b29d phpcs wants to change ... 2021-03-22 09:28:28 +00:00
59db09d337 add a Config::has($name) to check for the existance of a config value 2021-01-22 18:02:41 +00:00
b8fa60bb8a more type hints / psalm fixes 2020-09-28 20:33:54 +01:00
85e15790bb should fix: #351 2020-05-02 19:08:47 +01:00
df9a400ea2 remove debug stuff 2020-04-22 09:37:31 +01:00
fd48714615 fix issue reported with __LANG.$var - 844840c6a8 (commitcomment-38653465) 2020-04-22 09:34:25 +01:00
844840c6a8 simplify Config use; drop support for dotty name notation which we are not using 2020-04-14 21:26:01 +01:00
7965a83aff tighten psalm checks even more 2019-09-17 21:05:08 +01:00
c53d17fff7 support TRUE orFALSE strings just incase 2019-07-12 10:53:27 +01:00
5bc85bec44 fix error message in Config::read_array(() 2019-01-28 00:48:05 +01:00
4fcdba9cf4 run php-cs-fixer (code reforamt) 2018-12-28 19:31:43 +00:00
19cda31849 remove psalm warnings from code; fix password_expiry behaviour when enabled/disabled on MySQL 2018-12-28 19:27:33 +00:00
74002bbf57 psalm fixes 2018-12-27 21:43:11 +00:00
c44e82cc2d phpdoc fix 2018-06-10 21:24:06 +01:00
b48f99d4c6 reformat (phpcs) 2018-05-02 12:54:17 +01:00
94f05bf9e4 switch to store $config internally within an array 2018-04-29 21:52:57 +01:00
15df6c1d7b Reformat everything with PHP-Cs-Fixer 2018-01-26 23:54:37 +09:00
2289096ccc Config.php:
- do not error_log() 'undefined config option' for deprecated options



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1659 a1433add-5e2c-0410-b055-b7f2511e0802
2014-03-18 21:57:47 +00:00
eb2ccbc2e5 typo fix
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1642 a1433add-5e2c-0410-b055-b7f2511e0802
2014-02-19 11:47:17 +00:00
5871516b47 model/Config:
- read_f(): fix error logging - $var can be an array


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1559 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 16:00:20 +00:00
f748f31137 model/Config.php:
- Config::read(): error_log() attemps to read undefined config options


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1549 a1433add-5e2c-0410-b055-b7f2511e0802
2013-10-31 21:02:04 +00:00
4d9a338eb2 After hunting an "undefined index transport" error in list-domain, I
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
2013-10-13 18:11:18 +00:00
21494f2a14 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
2013-06-06 20:47:28 +00:00
dc8ea753fc Config.php:
- 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
2013-06-05 23:09:10 +00:00
b15319c21a functions.inc.php, model/Config.php:
- 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
2013-06-05 20:35:30 +00:00
563e401c92 make Config.php a php5 compatible object; remove strict standards warnings
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1236 a1433add-5e2c-0410-b055-b7f2511e0802
2011-10-24 22:24:21 +00:00
1a4bd35e08 Move the classes "Config" and "Lang" to scripts/common.php to model/
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
2011-10-17 21:47:58 +00:00