[geeklog-devel] [geeklog-cvs] Geeklog-1.x/system/classes config.class.php, 1.16, 1.17

Blaine Lang devel at portalparts.com
Sun Jan 20 22:53:39 EST 2008


Joe Mucchiello wrote:
 > So you could have a series of similar config settings with the same 
options not clutter the system with a bunch of duplicate functions. For 
example, if for some reason you needed to store dates in the 
configuration, there's no reason to have more than one function that 
displays dates.

Create a function stub for those fields and call a common date format 
function. I'd rather not have to create a new config option type which 
appears to be more restrictive. I don't expect most plugin config 
options will need these extra functions.

 > Why spend time call function_exists more than once?

What time - this is the configmanager code that is called on edit and I 
don't think a few extra microseconds are going to matter.

 > What happens when preprocess and postprocess aren't enough? And they 
aren't, there should be three state: to_display, to_edit, and to_save. 
Arguably there could be a 4th state: to_validate called before save but 
they can be combined.

There is only an edit mode, so I see no need for a display option and 
validate would be done in the postprocess function.

Blaine



More information about the geeklog-devel mailing list