[dev] New horde conf.xml

Ben Chavet ben at chavet.net
Fri Jan 30 17:02:12 PST 2004


I just noticed simular problems with imp's config. the

$conf['compose']['attach_size_limit']
$conf['compose']['attach_count_limit']

parameters state that setting the values to 0 means unlimited.  But, when you do
set them to 0, they are not generated at all.  This causes errors in the
compose window.

--Ben

Quoting Rick Emery <rick at emery.homelinux.net>:

> I've noticed some problems with the new conf.xml system for horde. 
> Namely, if a
> value is left blank, the value is not generated. Let me explain with an
> example (I'm not sure how to best exaplin it with words :-)
>
> $conf['prefs']['maxsize']. The comments say to leave it empty to skip the
> checking for max length. In conf.php.dist, it defaults to null. Using
> conf.xml, if the value is left empty, then $conf['prefs']['maxsize'] is not
> set, leading to (a lot of) "Undefined index 'maxsize'" errors.
>
> I had the same problem when setting the partner ID and the license 
> key for the
> weather.com block. In conf.php.dist, I set
> $conf['weatherdotcom']['partner_id'] = ''; (I guess null would have worked
> too). In conf.xml, it was never set, resulting in undefined index errors. I
> came up with two ways of dealing with this.
>
> 1. If no value is entered, generate the value anyway, and set it to 
> null (or an
> empty string). I haven't looked at it, but I think this would require changes
> in the way the conf.xml files are generated, and currently all of the other
> conf.xml files seem to work.
>
> 2. Everywhere the values are used, check for their existence with isset()
> before checking the values. This is how I did it in my patch to
> weatherdotcom.php.
>
> I just wanted to make someone aware of the problem, and seek feedback on the
> best way to handle it.
>
> Thanks for listening (or reading, as it were),
> Rick
>
> --
> Rick Emery
>
> "When once you have tasted flight, you will forever walk the Earth
> with your eyes turned skyward, for there you have been, and there
> you will always long to return"
>                                              -- Leonardo Da Vinci
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org



More information about the dev mailing list