[imp] saving sig_first pref doesn't seem to work
nlin@newton.berkeley.edu
nlin@newton.berkeley.edu
Wed, 14 Nov 2001 15:18:27 -0800
aha! i found it. should have looked here first.
in imp/identities.php under:
case IDENT_SAVE: (around line 80-89)
$identity->setValue('fullname', Horde::getFormData('fullname'));
$identity->setValue('from_addr', Horde::getFormData('from_addr'));
$identity->setValue('replyto_addr', Horde::getFormData('replyto_addr'));
$identity->setValue('signature', Horde::getFormData('signature'));
$identity->setValue('sig_dashes', Horde::getFormData('sig_dashes'));
$identity->setValue('sig_first', Horde::getFormData('sig_first'));
$identity->setValue('save_sent_mail', Horde::getFormData('save_sent_mail',
0));
So when I save an identity w/ sig_first & sig_dashes UNchecked, it gets
saved to the database as NULL.
Later, when I try to pull up my identity, with horde/lib/Identity.php, under
function getValue(), you have:
if (!isset($this->identities[$identity][$key]) || $prefs->isLocked($key)) {
$val = $prefs->getValue($key);
} else {
$val = $this->identities[$identity][$key];
}
And since sig_first is set to NULL, it will try to get the default
preferences ($val = $prefs->getValue($key);) set in imp/config/prefs.php,
which I have set to 1. That's why it's always checked. As for
save_sent_mail, since it's default value in identities.php is 0, things will
get saved correctly and pulled up correctly.
oohoo! hopefully i really figured it out this time.
nancy