[imp] saving sig_first pref doesn't seem to work

Jan Schneider jan@horde.org
Thu, 15 Nov 2001 11:51:24 +0100


A really nice catch!

If fixed this in cvs, please try if it works now.

Though I still don't know why it only happened to some people and worked 
perfectly for others.

Jan.

Zitat von nlin@newton.berkeley.edu:

> 
> 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
> 
> 
> 
> 
> -- 
> IMP mailing list: http://horde.org/imp/
> Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> 
> 


:::::::::::::::::::::::::::::::::::::::: 
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax  +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::