[horde] Pass a "enum" from hooks -> prefs.php
Jan Schneider
jan at horde.org
Fri Feb 1 16:28:47 UTC 2008
Zitat von Otto Stolz <Otto.Stolz at uni-konstanz.de>:
> Hello Andreas,
>
> Jan Schneider has written:
>> This preference expects a newline-separated list of addresses. You
>> could use any preference type that returns this, especially types that
>> return a single string only. Enum is one of these types.
>
> So, you could try:
>
> // user preferred 'tie to' addresses
> $_prefs['tieto_addr'] = array(
> 'value' => '',
> 'locked' => false,
> 'shared' => false,
> 'hook' => false,
> 'type' => 'enum',
> 'enum' => "test1 at kwsoft.com\ntest2 at kwsoft.com"
> 'desc' => _("Addresses to explicitly tie to this identity:
> <em>(optional, enter each address on a new line)</em>"));
No. Enums are still pre-filled with an array. I was talking about the
outcome of the preference types.
> And if this works allright, you would replace
> "test1 at kwsoft.com\ntest2 at kwsoft.com"
> with a call to your own function that yields
> a newline-separated string.
>
> However, IIRC pref.php is only called once per session,
> so the user will have to log out and in again, to see
> changes in your user database being reflected in the
> preferences form.
>
> Best wishes,
> Otto Stolz
>
>
>
>
> --
> Horde mailing list - Join the hunt: http://horde.org/bounties/#horde
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the horde
mailing list