[geeklog-devel] Adding "Core" Configuration Items
dirk at haun-online.de
Wed Aug 10 04:01:26 EDT 2011
Quoting Vincent Furia <vfuria at gmail.com>:
> This is where validation information is kept for configuration items. It is
> not well documented.
Yeah, it took me a while to understand that bit as well while trying
to reproduce bug #1374 (or rather why it didn't happen for me).
> You can also define your own configuration rules, which get prepended by
> custom_validation_ (see below).
Specifically, the validation code checks these things in order:
1) if a custom_validation_<rule> function exists, use that
example: "theme" -> custom_validation_theme() from admin/configuration.php
2) if a method with the same name as the rule exists, use that
example: "stringOrEmpty" -> stringOrEmpty() from validator.class.php
3) else assume the "rule" is really a regexp
More information about the geeklog-devel