Summary | Signature bug |
Queue | IMP |
Queue Version | 3.2.5 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | |
Requester | nummedal_imp (at) ime (dot) ntnu (dot) no |
Created | 08/10/2004 (7610 days ago) |
Due | |
Updated | 08/16/2004 (7604 days ago) |
Assigned | |
Resolved | 08/16/2004 (7604 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
But ignoring one of the preference if both are set is even worth and
too confusing.
We currently disable both prefs by default, so I think anybody
enabling both settings explicitely should know what he is doing.
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Signature bug
Queue ⇒ IMP
and forwarding messages. Any mailreader (including Imp itself) that
knows of the '-- ' convention will then treat the quoted text after
the signature as part of the signature. This is confusing for any
recipients of such messages. The solution is to only honor the
sig_dashes flag if composing a new message or if the sig_first flag is
not set.
The following patch is not tested, but should at least be a guide to a
finished fix.
*** lib/Identity/IMP.php.org Tue Aug 10 15:40:02 2004
--- lib/Identity/IMP.php Tue Aug 10 19:09:38 2004
***************
*** 233,245 ****
$val = $this->getValue('signature', $ident);
if (isset($val)) {
$sig_first = $this->getValue('sig_first', $ident);
- $sig_dashes = $this->getValue('sig_dashes', $ident);
$val = str_replace("\r\n", "\n", $val);
- if ($sig_dashes) {
- $val = "-- \n$val";
- }
if (isset($sig_first) && $sig_first) {
$val = "\n" . $val . "\n\n\n";
} else {
$val = "\n" . $val;
--- 233,241 ----
*** compose.php.org Tue Aug 10 15:43:00 2004
--- compose.php Tue Aug 10 19:43:16 2004
***************
*** 1208,1222 ****
$identity->getValue('save_sent_mail', $ident));
}
$sig = $identity->getSignature();
$sig_first = $identity->getValue('sig_first');
if ($get_sig) {
if (isset($msg) && !empty($sig)) {
! if ($sig_first) {
$msg = "\n" . $sig . $msg;
} else {
! $msg .= "\n" . $sig;
}
}
}
--- 1208,1229 ----
$identity->getValue('save_sent_mail', $ident));
}
$sig = $identity->getSignature();
$sig_first = $identity->getValue('sig_first');
+ $sig_dashes = $identity->getValue('sig_dashes');
+
+ // Only honor sig_dashes if the signature is at the end, or the
message is empty.
if ($get_sig) {
if (isset($msg) && !empty($sig)) {
! if ($sig_first && !empty(trim($msg))) {
$msg = "\n" . $sig . $msg;
} else {
! if ($sig_dashes) {
! $msg .= "\n-- \n$" .sig;
! } else {
! $msg .= "\n" . $sig;
! }
}
}
}