From: Jeff D. <da...@da...> - 2002-09-15 00:48:41
|
> How about placing the configuration in two files: one file with a > default configuration and one file with the users customizations. Yes. The current system sort of started out that way with the 'user-config' in index.php and the 'dist-config' in lib/config.php. I.e. most of the settings in index.php were commented out be default, and then lib/config.php filled in the defaults... (Note that due to our use of define()s (which can't be re-defined) the dist-defaults need to be filled in _after_ the user customizations, like so: if (!defined('FOO')) define('FOO', 'default value'); ) Over time, as people have added options to index.php, I see the defaults have been stuck in there too... I think it would be real slick if the config script got all its info from (specially formatted) comments (and code) in the dist-config file. (Maybe it already works that way?) Then problems with keeping the configurator in sync with the config options go away.... |