[horde] Changing prefs globally

Craig White craigwhite at azapple.com
Tue Aug 23 12:06:44 PDT 2005


On Tue, 2005-08-23 at 12:47 -0600, Kevin Konowalec wrote:
> 
> On Aug 23, 2005, at 12:21 PM, Craig White wrote:
> 
> > On Tue, 2005-08-23 at 11:47 -0600, Kevin Konowalec wrote:
> > 
> > > On Aug 23, 2005, at 11:39 AM, Jan Schneider wrote:
> > > 
> > > 
> > > 
> > > > Zitat von Kevin Konowalec <kevin at ualberta.net>:
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > > I got a message from our mailserver admin that the sent mail
> > > > > folder
> > > > > needs to change.  In the imp/config/prefs.php file there is
> > > > > the
> > > > > following:
> > > > > 
> > > > > 
> > > > > // sent mail folder
> > > > > $_prefs['sent_mail_folder'] = array(
> > > > >     'value' => 'sent-mail',
> > > > > // For Exchange server uncomment the line below and delete the
> > > > > line
> > > > > above
> > > > > //    'value' => 'Sent Items',
> > > > >     'locked' => false,
> > > > >     'shared' => false,
> > > > >     'type' => 'implicit');
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > The way I understand it, this is now set for all my users in
> > > > > their
> > > > > individual prefs.  If I change it, how do I apply the change
> > > > > across
> > > > > the whole database (mySQL)?
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > > You need a script for that, because they are stored in the
> > > > serialized
> > > > identities.
> > > > 
> > > > 
> > > > Jan.
> > > > 
> > > 
> > > 
> > > 
> > > 
> > > Has anyone written anything like this?  I'd hate to have to
> > > reinvent  
> > > the wheel...  Of course it'd be handy to have a script that could
> > >  
> > > take an attribute name and value and blast it into the serialized
> > >  
> > > identities across the board.... 
> > > 
> > ----
> > I got pretty far on it a few months back but I never finished it.
> > 
> > 
> > It's really just an sql command - in your case, I would think that
> > you
> > could simply delete the existing values and then it would go back to
> > the
> > 'prefs.php' for value.
> > 
> > 
> > I think something like below should do it for mysql (untested) - the
> > first statement giving you a clue of what it will find and delete.
> > 
> > 
> > mysql> select * from horde_prefs where pref_name =
> > "sent_mail_folder";
> > mysql> delete all from horde_prefs where pref_name =
> > "sent_mail_folder";
> > 
> > 
> > Craig
> 
> 
> 
> Thanks Craig!  I get an empty set when I try that command.  
> 
> 
> I looked at my own prefs and I can see that the sent mail folder value
> is serialized in the "identities" attribute.  So it's not just a
> simple replacement of that particular field (if only it were that
> simple).  
> 
> 
> It's interesting that not all users have that 'identities' attribute.
> If they don't, does imp look at the prefs.php file?  
----
my understanding is that if the value is unset, then it simply uses the
value provided by the appropriate prefs.php file.

You are correct - that's why I couldn't find it in my search either -
because the value is serialized in the identities...duh!

I suppose you could simply smack out their 'identities' value completely
- in my case, it's pretty much automatically created upon login but that
is the issue, it does require a log-in to be set which has created
problems for things like free/busy retrieval as the identity must be set
for that.

It's sort of like using a mallet to hammer a finishing nail...not very
delicate.

Craig



More information about the horde mailing list