Goteo/Goteo — pull request #80 by w0rldart (2014-02-13 02:07:05+00:00)
Title: I suggest a more dynamic approach to having config files for different e...

...nvironments.

In the code suggested, there will be default config files in `config/` folder, but if you want to have config files, only for a specific environment (environments are analyzed through the `$_SERVER['SERVER_NAME']` variable), you will only have to adjust the switch that start at `config.php:44`, by adding you case.

For example:
On local environments, I always create a host called local.project.com (in this case, local.goteo.com), and if I ever want to have specific configuration only for a specific config file (usually is always database.php file), I just create a `local/` directory inside `config/` directory, and copy `database.php` there. Then I just modify the parameters to suit my local configuration for my database.

NOTE*: If `config/local/database.php` does not exist, or any other local environment config file, it will load the one in the main config folder.

Signed-off-by: Alexandru Budurovici