Quoting LALOT Dominique <dom.la...@gmail.com>:
2012/4/27 Vilius Šumskas <vil...@lnk.lt>
Sveiki,
Friday, April 27, 2012, 9:33:11 PM, you wrote:
> On 27/04/12 19:20, Vilius Šumskas wrote:
>> Sveiki,
>>
>> Friday, April 27, 2012, 8:33:57 PM, you wrote:
>>
>>>>
>>>>
>>>> $_prefs['msgflags'] = array(
>>>> // 'value' = serialize(array())
>>>> 'value' => 'a:0:{}'
>>>> );
>>>>
>>>>
>>>> As far as i know, you can use your customize theme and amend color
whatever
>>>> you want.
>>
>>> The problem is that I'm trying to set a default value for flag colours
>>> for all users and lock it - in prefs.local.php
>>
>>> I've already changed them for individual users through the interface -
>>> and it works - but they only apply to that particular user and the
>>> settings go in the SQL back end. I need a way of specifying defaults in
>>> prefs.local.php - and I can't find the right syntax/format for the
array
>>> 'msgflags'.
>>
>> Check SQL backend for 'msgflags' for the particular user where you
modified the flags
>> like they should be. And then copy paste that value to
>> prefs.local.php.
>>
> As I've mentioned in my original post, I've already looked in the SQL
> backend. The value is one very long hex number (at least it looks like a
> hex number, it starts with "\x"). Actually, most values in horde_prefs
> seem to be hex numbers (even the ones that have proper human readable
> correspondents in prefs.local.php) - so I don't think I can just copy
> them to the prefs.local.php.
Ahh, yes I've forgot this is changed now. You will have to parse the
value using PHP/MySQL/PostgreSQL functions. For MySQL the value is
just a BLOB field. For PostreSQL I think it is an escaped BYTEA field.
Hopefully someone will write a script for this in the future.
Yes, using BLOB does not help setting prefs. There should be a technical
reasons but it's not very helpfull.
The technical reason is that prefs can be binary (non-text) data. And
BLOBs/BYTEA/etc. (and the like) is the *ONLY* way to correctly store
this data.
michael
___________________________________
Michael Slusarz [slus...@horde.org]
--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: imp-unsubscr...@lists.horde.org