custom settings in ini files

Author Message

Damien Pobel

Tuesday 13 June 2006 12:58:28 am

For several project I need to store specific settings. I use my own section in ini files :

[MySection]
NewsByPage=10
Help[news]=you should do this
Help[forum]=you should do that

it works well with single values and array with textual keys but when I use numeric keys in array, my settings are corrupted.

Example :
I write this

[MySection]
NewsID[163]=189
NewsID[192]=202

and after some use, eZ publish rewrites my config like that :

[MySection]
NewsID[]=189
NewsID[]=202

Is it normal or a bug ?

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Kristof Coomans

Tuesday 13 June 2006 1:13:54 am

Hi Damien

This is normal. I would recommend you to use some kind of prefix for your keys:

[MySection]
NewsID[blabla_163]=189
NewsID[blabla_192]=202

Of course, replace "blabla" with something meaningful ;-)

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Damien Pobel

Tuesday 13 June 2006 2:10:02 am

thanks for the quick answer !

I tried another solution that seems to work properly, I create my own ini file where I put my custom settings. It seems that eZ publish doesn't rewrite this custom file, so my settings aren't corrupted.

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.