[imp] Identities vanished
Akom
lists@akom2.2y.net
Thu Nov 7 03:09:34 2002
Hello all,
I just updated from CVS and noticed that the Identities editor
seems to be broken... It only shows the sent-folder selection.
Also, compose window no longer presents a choice of identities (I have 10),
but instead has a hardcoded Default Identity email in its place.
Both my default_identity and from_addr are shared and not locked.
I haven't updated in about a week so I'm not sure when this happened.
I use mysql backend and imp as auth app.
After a lot of debugging, I narrowed it down to this:
Each time any horde app reads Prefs (lib/Prefs/sql.php) it overrides the locked
setting for variables that are in the table but not in the current prefs
array. (around line #200).
This isn't normally an issue if the scope was contained to that app, but the
query gets both app scope and horde scope. default_identity happens to be in
horde scope, so when (for example) nag reads its prefs it reads
default_identity from the DB, doesn't find it in its prefs array (coming out of
nag/config/prefs.php) so it sets it to locked. This overrides the existing
mask for that pref when it calls Prefs->Add.
My quick hack was to change line 199 from:
$this->add($name, $row['pref_value'], _PREF_LOCKED | _PREF_SHARED);
to
$this->add($name, $row['pref_value'], ($this->scope == 'horde' ? _PREF_LOCKED :
0) | _PREF_SHARED);
And that is truly a hack. Perhaps it's better to make it more clean by
actually checking if this is already in the main prefs array and either not add
it or update it based on the already set mask.
I hope this makes sense and I didn't do something unnecessary due to
overlooking the obvious. I also realize that this is probably a horde issue
rather than IMP, but I've only seen it in IMP so far.
Thanks,
Akom
More information about the imp
mailing list