[imp] filterprefs.php and the template system

Liam Hoekenga liamr at umich.edu
Thu May 29 19:21:24 UTC 2008



 I think I figured it out.  We had prefs that predated the fix that forced the checkboxes to have values of 1 or 0.  If the pref has a value of "on", it does't appear to let you turn it off. 

Liam Quoting Liam Hoekenga <liamr at umich.edu>:

> So... the prefs I added to filterprefs.php for our installation broke
> between RC3 and RC4.  Here's the original thread, to refresh your
> memories..
>
>      http://marc.info/?l=imp&m=120127828419257&w=2[1]
>
> Any ideas what changed that might have broken my stuff?
>
>
> Liam
>
>
> Quoting Chuck Hagenbuch <chuck at horde.org>:
>
>> Quoting Liam Hoekenga <liamr at deathstar.org>:
>>
>>> It looks like the solution that requires the least change to the Horde
>>> code is to change the name of my form fields in the update_prefs case
>>> statement:
>>>
>>>     if (!$bw_lists_locked) {
>>>         $prefs->setValue('show_bw_lists',
>>> Util::getFormData('filter_bw_lists'));
>>>     }
>>>     if (!$spam_links_locked) {
>>>         $prefs->setValue('show_spam_links',
>>> Util::getFormData('filter_spam_links'));
>>>     }
>>>
>>> tho, I'll go with the second option you mentioned should you guys make
>>> that change yourself.
>>
>> I don't feel strongly about it, so, unless there's a bug filed or
>> someone speaks up enthusiastically, I'm going to leave it as is.
>>
>>> It looks like in Horde 3.2.x / IMP 4.2.x, checked checkboxes are given
>>> the value "on" in the prefs database, instead of "1"?
>>
>> I can't reproduce this for general checkboxes, but the filter prefs
>> and a few other custom checkboxes were doing it. This should fix it:
>>
>> http://lists.horde.org/archives/cvs/Week-of-Mon-20080121/074369.html[2]
>>
>> -chuck
>> --
>> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp[3]
>> Frequently Asked Questions: http://horde.org/faq/[4]
>> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>>
>
> --
> IMP mailing list - Join the hunt: http://horde.org/bounties/#imp[5]
> Frequently Asked Questions: http://horde.org/faq/[6]
> To unsubscribe, mail: imp-unsubscribe at lists.horde.org
>
> !DSPAM:483ef6d079791903312405!
>
>
>
>


Links:
------
[1] http://marc.info/&#63;l=imp&amp;m=120127828419257&amp;w=2
[2] http://lists.horde.org/archives/cvs/Week-of-Mon-20080121/074369.html
[3] http://horde.org/bounties/#imp
[4] http://horde.org/faq/
[5] http://horde.org/bounties/#imp
[6] http://horde.org/faq/


More information about the imp mailing list