|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ryan Smarty n00b
Joined: 13 Nov 2003 Posts: 4
|
Posted: Thu Jan 22, 2004 10:57 pm Post subject: Conf functionality broken with Smarty 2.6.1 |
|
|
up through Smarty 2.6.0, we would put the following in site.conf
# global variables
site_name = Jones website
MAX_FILE_SIZE=1048576
# hidden section
[.Database]
host=localhost
username=jones
password=paul
database=jonesDB
and we'd retrieve the DB info like this in our php file
$conf = new Config_File('./configs');
connect_db(
$conf->get('site.conf', 'Database', 'host'),
$conf->get('site.conf', 'Database', 'username'),
$conf->get('site.conf', 'Database', 'password'),
$conf->get('site.conf', 'Database', 'database')
);
With 2.6.1 this is now broken. The only way to get it to work is to change this to:
connect_db(
$conf->get('site.conf', '', 'host'),
$conf->get('site.conf', '', 'username'),
$conf->get('site.conf', '', 'password'),
$conf->get('site.conf', '', 'database')
);
Note that the site.conf file may _not_ have any sections other than the hidden [.Database] because therein lies some of the broken code.
Any ideas as to what is going on?
Thanks
Ryan |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Jan 22, 2004 11:43 pm Post subject: Re: Conf functionality broken with Smarty 2.6.1 |
|
|
ryan wrote: | Any ideas as to what is going on? |
You've found a bug. I am working on a fix. Thanks for your attention! |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Jan 22, 2004 11:55 pm Post subject: |
|
|
It's fixed in CVS. Please test. |
|
Back to top |
|
ryan Smarty n00b
Joined: 13 Nov 2003 Posts: 4
|
Posted: Fri Jan 23, 2004 3:35 pm Post subject: |
|
|
works great! thanks for such a quick response!
you guys rock |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|