[dev] pref - maxsize

Jan Schneider jan at horde.org
Sat Feb 7 15:17:23 PST 2004


Zitat von steve <mailling at gmx.co.uk>:

> Now, let me explain why this patch is required.
> In conf.php.dist, we have:
> // The size of the preferences field in your backend in bytes. Horde will
> // reject any write to the preferences backend if its length exceeds this
> // value. Leave null to skip this checking.
> // e.g. MySQL stores the preference data in a LONGTEXT field. This field
> // can hold 4294967295 bytes so most likely checking is not needed. However
> // other DB installations may only have a storage size of 64 KB (65535
> // bytes). These installations would want to turn checking on.
> $conf['prefs']['maxsize'] = null;
>
> So it is highly probable that $conf['prefs']['maxsize'] = null
>
> So the next statement in prefs.php won't work:
> if (strlen($val) > $conf['prefs']['maxsize']) {

This has nothing to do with your patch below.

>> Zitat von steve <mailling at gmx.co.uk>:
>>
>> > In config.xml, the maxsize is set as not required, so we need to add this:
>> > (because when we generate conf.php with the Horde admin tool, it can be
>> > removed)
>> >
>> > RCS file: /repository/framework/Prefs/Prefs.php,v
>> > retrieving revision 1.129
>> > diff -w -b -r1.129 Prefs.php
>> > 276c276
>> > <         if (isset($conf['prefs']['maxsize'])) {
>> > ---
>> > >         if (isset($conf['prefs']['maxsize']) &&
>> > !is_null($conf['prefs']['maxsize'])) {

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - Neue Wege des Lernens
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the dev mailing list