[dev] pref - maxsize

steve mailling at gmx.co.uk
Sat Feb 7 04:47:40 PST 2004


I don't get your personal attack, I read mails in digest mode, and I don't 
have a permanent internet connection; so yes, it can take times for me to 
read and replies (are you talking about my diff format?). If I miss an 
e-mail from you, I am sorry about it, it is a mistake I did.

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']) {

Just fyi

At 18:57 06/02/2004, you wrote:
>Message: 3
>Date: Fri,  6 Feb 2004 16:20:38 +0100
>From: Jan Schneider <jan at horde.org>
>Subject: Re: [dev] pref - maxsize
>To: dev at lists.horde.org
>Message-ID: <20040206162038.xyckws8swscksks0 at jan.dip.ammma.net>
>Content-Type: text/plain; charset="ISO-8859-15"; format="flowed"
>
>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'])) {
>
>This doesn't change anything (and there is no need to change anything, btw)
>because isset() is exactly the opposite of is_null().
>
>But why do I answer, you don't read replies anyway.
>
>Jan.



More information about the dev mailing list