Revision [2806]

This is an old revision of HandlingWikkaConfig made by NilsLindenberg on 2004-12-03 17:49:04.

 

Handling the Config(s) of Wikka

As I took a deeper look at the way the config is handeld, I got more and more confused. Perhaps you can help me with my questions.
-- NilsLindenberg

1. There is an array called $wakkaDefaultConfig right under the comment default configuration values. But actually these values are no default-config, couse you can not run the program with it (it is missing information about the MySQL-access for example).

My question: do we need to merge this config with the normal one at every call of wikka.php? Or would it be enough to do this in default.php (and putting the array there?)

This would get us rid of the array_merge in wikka.php, which is by the way done three times in three different files (wikka.php; setup/install.php and setup/writeconfig.php.

2. If we can do this, wikka.php just has to prove if there is a wikka.config.php. Otherwise it has to start the installer, to let the user make (a new) one.

3. the variable: $wakkaConfigLocation. This variable is used to print the name wikka.config.php in some files (install and writeconfig), but I can't make sense of it. Why a variable when we don't give the user the choice to change it?

a) if we wont to make the admin change the config_file, we better use a constant, which has only to be changed once in the code, and replace every wikka.config.php (note that it would be necessary to change this again after copying a new version to the directory)

b)if we don't wont that, wikka.config.php should better be hardcoded, which makes the code easier to read and understand.


CategoryDevelopment
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki