[imp] filterprefs.php and the template system

Liam Hoekenga liamr at deathstar.org
Fri Jan 25 20:39:50 UTC 2008


> I think what you want is to change filterprefs.php so that it sets  
> $opts to the original prefs, and assigns the custom options to another  
> variable - $show_opts? Then add a second loop just on that.
>
> Or, you could just change the $options_array variable in  
> filterprefs.php to include the filter_ prefix, and remove the prefix  
> from the template. That might be good to do in the main codebase  
> anyway, for better flexibility and to avoid any hair pulling if we add  
> another non filter_* option to that page.
>   
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.

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"?

Liam


More information about the imp mailing list