From: Jeff D. <da...@da...> - 2002-09-16 18:09:05
|
> No, it doesn't work that way. The configurator knows nothing about the > config-dist.php file at the moment. > > But I agree that it would be cool to have the configurator get it's > data from a config-dist.php file which should be a fully functional > file itself. Yes, or we just treat the configurator.php as the ultimate authority and generate the default config file using configurator.php. Then the problem of keeping the two in sync goes away. Of course, if Joby wants to write a perl configurator as well, then the problem comes back.... oh well Personally, I'm not sure we need a standalone (non web based) configurator script. It think Reini has already suggested this but here's a possible UserStory: (First: configurator.php should not be the entry point, the entry should be through the main wiki script --- this allows configurator.php to properly autodect things like VIRTUAL_PATH...) 1. The Configurator is fired up by browsing the main wiki script, either with a query_arg of action=configurator, or if the wiki is a virgin, unconfigured wiki, it fires up the configurator automatically... Note that configurator.php should not be the entry point, the entry should be through the main wiki script --- this allows the configurator to properly autodect things like VIRTUAL_PATH. 2. The configurator reads in the current configuration file (if it exists), merges in defaults and autodetected values, then presents the user with the configurator form. Specially formatted comments in the config file could be used to indicate the default/autodetected values of each setting --- this would allow the configurator script to determine whether a setting has been customized, and would also allow give the human reader useful information. E.g.: /* VIRTUAL_PATH * * VIRTUAL_PATH is the ... blah blah... * * Example: * define('VIRTUAL_PATH', '/SomeWiki') * * Default Value: * define('VIRTUAL_PATH', '/foowiki') */ define('VIRTUAL_PATH', '/foowiki'); When merging the current configuration with default/autodetected values the configurator would pick the current config values only if they had been changed from their default values (at the time the current config script was produced). 3. When the user has changed whatever settings he wanted to change, he hits the "Download new configuration" button, and a new config file gets downloaded (to the client computer, not the server). 4. Then the new configuration file must then be manually installed on the server in the appropriate place (via FTP, rcp, scp, etc...) |