lonnieezell / Bonfire

Jumpstart your CodeIgniter web applications with a modular, HMVC-ready, backend.
http://cibonfire.com
1.39k stars 525 forks source link

0.7 installer writes database to wrong file #703

Closed dot-mike closed 4 years ago

dot-mike commented 11 years ago

0.7-dev installer writes database.php-config to wrong dir/file. It currently writes to: application/config/database.php when I selected development-mode. It should write to: application/config/development/database.php

dot-mike commented 11 years ago

I'm thinking about correcting this issue, but before I do so, I want to solve some questions.

dot-mike commented 11 years ago

I refrenced wrong issue.. Sorry for this!

sourcejedi commented 11 years ago

Odd, I have a feeling it writes to both of those files in some way :).

It seems reasonable to limit it to application/config/$environment/database.php. The installer would need to check write permission on those paths... oh, it already does :).


Using active_group is a cool question. Though for me, separate files feel easier & safer.

Also active_group would be another setting when we already have ENVIRONMENT in index.php. We'd have to clarify that when the installer asks for the environment, it's not going to key off the standard CodeIgniter ENVIRONMENT. Which people already want to set, to control error-reporting.

(Caveat: the installer currently doesn't rewrite index.php to set ENVIRONMENT for you. Maybe it's concerned about the permission problem, though that's a bit late since we're already include-ing writeable files).


Oh duh, I took way to long to figure out your last point. Well... we can get away with leaving the template in application/config/database.php, just as it is now. I don't think we need to solve that question before we do anything else, it'd just be nice if we don't forget about it :).