[freeside-devel] default configuration values
Ivan Kohler
ivan at sisd.com
Thu Sep 20 20:55:54 PDT 2007
On Tue, Sep 18, 2007 at 12:59:37PM +0200, Mathieu Dimanche wrote:
> Hi,
>
> As I'm trying to have the address State field optional (in france, we
> really don't care about this information, but it is required and have us
> loose time while creating a new customer),
To back up just a little bit; rather than create a new configuration
value turning off the state requirement, all you need to do is remove
the multiple entries for FR in the cust_main_county table, leaving only
one, with blank state and county fields.
> I ran into the FS::Conf object and have seen a behavior I find rather
> awkward.
>
> Default configuration values are not defined in the FS:Conf object but
> are hard-coded everywhere the value is fetched. Couldn't there be a
> "defaultvalue" key in the config_items array ?
Sure, that's a good idea.
> then, the FS::Conf would
> return (in priority order)
> * the value found in the correct conf/file
> * the value in the base
> * the default value in the config_items array (if specified)
Not sure what you mean by the first two items here (and configuration is
stored in the database now). Wouldn't it be:
1. the agent-override config value (from the db)
2. the global config value (from the db)
3. the default value (from config_items)
> I think this behaviour would be must more appropriate.
>
> What do you think ?
>
> Mathieu
>
> PS : What's the difference between FS::Conf in Conf.pm and FS::Conf in
> Conf_compat17.pm ?
In 1.7.x, configuration is kept in the filesystem. In 1.9.x,
configuration is kept in the database.
Conf_compat17.pm in 1.9 is for reading 1.7-style configuration values
out of the filesystem. This is used for testing purposes, to help
ensure that configuration is consistent across the upgrade.
> If one is deprecated, should it be removed ?
Eventually, yes, once we don't need to worry about upgrades from
1.7.x; in the next development branch after 1.9.x.
> Which should receive updates ?
Conf.pm
--
_ivan
More information about the freeside-devel
mailing list