[horde] hook appinitialized
Michael M Slusarz
slusarz at horde.org
Wed May 25 16:24:14 UTC 2011
Quoting Ronan SALMON <rsalmon at mbpgroup.com>:
> Hi all,
>
> I'm trying to assign a new value to a looked pref from hook appinitialized().
>
> Example with turba :
>
> $_prefs['addressbooks']['locked'] = true;
>
> turba/config/hook.php:
> public function appinitialized() {
>
> $GLOBALS['prefs']->setValue('addressbooks',json_encode($sources),
> array('nosave' => true));
> }
>
> The pref doesn't get setted, because setValue() from
> framework/Prefs/lib/Horde/Prefs.php doesn't do anything if pref is
> locked.
>
> So, how can I update a locked pref from hook appinitialized()
Unlock the pref, store the value, and re-lock if necessary.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the horde
mailing list