Here’s my patch for the same. The reason I prefer this implementation is
that it results in cleaner UI for the end-user…
Index: Prefs.html
RCS file: /raid/cvsroot/rt/webrt/User/Attic/Prefs.html,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 Prefs.html
— Prefs.html 2001/05/14 02:15:27 1.1.2.8
+++ Prefs.html 2001/08/02 07:56:14
@@ -10,7 +10,7 @@
<& /Elements/TitleBoxEnd &>
<& /Elements/TitleBoxStart, title => ‘Signature’ &>
+
<% $session{'CurrentUser'}->UserObj->Signature %>
@@ -31,7 +31,7 @@
push (@results, "Password: ".$msg);
}
}
-if ($Signature) {
+if ($Signature || $SignatureMagic) {
$Signature =~ s/(\r\n|\r)/\n/g;
if ($Signature ne $session{'CurrentUser'}->UserObj->Signature) {
my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetSignature($Signature);
@@ -45,6 +45,7 @@
<%ARGS>
$Signature => undef
+$SignatureMagic => undef
$NewPass1 => undef
$NewPass2 => undef
</%ARGS>On Mon, Jul 30, 2001 at 03:15:54PM +0100, Feargal Reilly wrote:
Ahem.
I sent the wrong patch for this earlier - there’s a line which reads
push (@results, "Clear: ".$ClearSignature);
which isn’t required, it was there for debugging purposes.
The patch below is correct.
— src/rt-2-0-4/webrt/User/Prefs.html Mon May 14 02:15:27 2001
+++ /usr/local/rt2/WebRT/html/User/Prefs.html Mon Jul 30 14:04:39 2001
@@ -13,6 +13,7 @@
<% $session{'CurrentUser'}->UserObj->Signature %>
+Clear Signature
<& /Elements/TitleBoxEnd &>
<& /Elements/Submit &>
@@ -31,9 +32,13 @@
push (@results, "Password: ".$msg);
}
}
-if ($Signature) {
- $Signature =~ s/(\r\n|\r)/\n/g;
- if ($Signature ne $session{'CurrentUser'}->UserObj->Signature) {
+if ($ClearSignature == 1) {
+ my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetSignature('');
+ push (@results, "Signature: ".$msg);
+}
+elsif ($Signature) {
+ $Signature =~ s/(\r\n|\r)/\n/g;
+ if ($Signature ne $session{'CurrentUser'}->UserObj->Signature) {
my ($val, $msg)=$session{'CurrentUser'}->UserObj->SetSignature($Signature);
push (@results, "Signature: ".$msg);
}
@@ -47,4 +52,5 @@
$Signature => undef
$NewPass1 => undef
$NewPass2 => undef
+$ClearSignature => undef
–
Feargal Reilly,
Systems Administrator,
The CIA.
jesse reed vincent – root@eruditorum.org – jesse@fsck.com
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90
Pelcgb-serrqbz abj!