Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Question about the $Configuration scheme
First of all, I'd like to say that I absolutely LOVE Vanilla 2. I just have a question that I'm burning to ask.
I see the conf.php file containing 3 dimensional arrays and a bunch of code that iterates through these arrays from input like: Gdn::Config('Database.Host', '');
My question is: why is it necessary to make this huge round-the-world code?
For instance, instead of:
$Configuration['Database']['Host'] = 'whatever';
and accessing it like:
$this->_DatabaseInfo['HostName'] = Gdn::Config('Database.Host', '');
Why go to all that trouble when you could do something like:
$Configuration['Database.Host'] = 'whatever';
and access it like:
$this->_DatabaseInfo['HostName'] = $Configuration['Database.Host'];
It just seems overly complicated for no reason. If you could let me know why it has to be that way, I'd love to know!
I see the conf.php file containing 3 dimensional arrays and a bunch of code that iterates through these arrays from input like: Gdn::Config('Database.Host', '');
My question is: why is it necessary to make this huge round-the-world code?
For instance, instead of:
$Configuration['Database']['Host'] = 'whatever';
and accessing it like:
$this->_DatabaseInfo['HostName'] = Gdn::Config('Database.Host', '');
Why go to all that trouble when you could do something like:
$Configuration['Database.Host'] = 'whatever';
and access it like:
$this->_DatabaseInfo['HostName'] = $Configuration['Database.Host'];
It just seems overly complicated for no reason. If you could let me know why it has to be that way, I'd love to know!
0
Comments
$var = C('Garden.Feature.Option');
But I'm still wondering why so much effort for such a simple task?