summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-02-21 06:37:35 +0000
committerPeter Palfrader <peter@palfrader.org>2003-02-21 06:37:35 +0000
commitd3b3dfdd1817df27fc247f91cc7b7d2755dbee2c (patch)
tree0c7ffba9cf85340e12e27258eb714e8f98964720
parent512e2428f0f4cbdc0d36fe28401012130256f130 (diff)
Add Disclaimer top/bottom
-rw-r--r--Echolot/Fromlines.pm26
-rw-r--r--templates/fromlinesindex.html14
2 files changed, 26 insertions, 14 deletions
diff --git a/Echolot/Fromlines.pm b/Echolot/Fromlines.pm
index d092f21..e78c684 100644
--- a/Echolot/Fromlines.pm
+++ b/Echolot/Fromlines.pm
@@ -1,7 +1,7 @@
package Echolot::Fromlines;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Fromlines.pm,v 1.3 2003/02/18 10:30:35 weasel Exp $
+# $Id: Fromlines.pm,v 1.4 2003/02/21 06:37:35 weasel Exp $
#
=pod
@@ -48,27 +48,37 @@ sub build_fromlines() {
my $from = $from_info->{'from'};
$from = 'Not Available' unless defined $from;
$from = 'Middleman Remailer' if $middleman;
- push @{$from_types->{$from}}, $type;
+ my $disclaim_top = $from_info->{'disclaim_top'} ? 1 : 0;
+ my $disclaim_bot = $from_info->{'disclaim_bot'} ? 1 : 0;
+ my $frominfo = $disclaim_top.':'.$disclaim_bot.':'.$from;
+ push @{$from_types->{$frominfo}}, $type;
};
my $types_from;
- for my $from (sort keys %$from_types) {
- my $types = join ", ", sort { $a cmp $b } @{$from_types->{$from}};
- $types_from->{$types} = $from;
+ for my $frominfo (sort keys %$from_types) {
+ my $types = join ", ", sort { $a cmp $b } @{$from_types->{$frominfo}};
+ $types_from->{$types} = $frominfo;
};
my @types_from = map {
+ my ($disclaim_top, $disclaim_bot, $from) = split (/:/, $types_from->{$_}, 3);
{
nick => $nick,
address => $addr,
types => $_,
- from => Echolot::Tools::escape_HTML_entities($types_from->{$_})
+ disclaim_top => $disclaim_top,
+ disclaim_bot => $disclaim_bot,
+ from => Echolot::Tools::escape_HTML_entities($from)
}
} sort { $a cmp $b } keys %$types_from;
$data->{$user_supplied}->{$addr}->{'data'} = \@types_from;
};
# Remove user supplied if identical
- my $f0 = join ':', map { $_->{'types'} .':'.$_->{'from'}} @{$data->{0}->{$addr}->{'data'}};
- my $f1 = join ':', map { $_->{'types'} .':'.$_->{'from'}} @{$data->{1}->{$addr}->{'data'}};
+ my $f0 = join ':', map {
+ $_->{'disclaim_top'}.':'.$_->{'disclaim_bot'}.$_->{'types'}.':'.$_->{'from'}
+ } @{$data->{0}->{$addr}->{'data'}};
+ my $f1 = join ':', map {
+ $_->{'disclaim_top'}.':'.$_->{'disclaim_bot'}.$_->{'types'}.':'.$_->{'from'}
+ } @{$data->{1}->{$addr}->{'data'}};
if ($f0 eq $f1) {
delete $data->{1}->{$addr};
};
diff --git a/templates/fromlinesindex.html b/templates/fromlinesindex.html
index cef314c..3081522 100644
--- a/templates/fromlinesindex.html
+++ b/templates/fromlinesindex.html
@@ -3,7 +3,7 @@
<title>From Headers [<TMPL_VAR NAME="SITE_NAME">]</title>
<META HTTP-EQUIV="Expires" CONTENT="<TMPL_VAR NAME="EXPIRES">">
<link href="echolot.css" rel="stylesheet" type="text/css">
- <!-- $Id: fromlinesindex.html,v 1.3 2003/02/21 06:09:39 weasel Exp $ -->
+ <!-- $Id: fromlinesindex.html,v 1.4 2003/02/21 06:35:54 weasel Exp $ -->
</head>
<body>
<h1>From Headers [<TMPL_VAR NAME="SITE_NAME">]</h1>
@@ -20,12 +20,13 @@ convenience.
<p>
<table border=1>
-<tr><tr><th>nick</th><th>From Line</th><th>type</th></tr>
+<tr><tr><th>nick</th><th>Disclaimer</th><th>From Line</th><th>type</th></tr>
<TMPL_LOOP NAME="default">
<TMPL_LOOP NAME="data">
<tr>
<td><TMPL_VAR NAME="nick"></td>
+ <td align="center"><TMPL_IF NAME="disclaim_top">top</TMPL_IF>&nbsp;<TMPL_IF NAME="disclaim_bot">bot</TMPL_IF></td>
<td><TMPL_VAR NAME="from"></td>
<td><small><TMPL_VAR NAME="types"></small></td>
</tr>
@@ -37,20 +38,21 @@ convenience.
<h2>User Supplied From: Headers</h2>
<p>
-If messages sent with a user supplied From header differ from those
-without, the remailer is listed here. The difference can either
-be an additional disclaimer, really allowing (partial) From headers,
+If a message sent with a user supplied From header differs from
+one without, the remailer is listed here. The difference can either
+be an additional disclaimer, actually allowing (partial) From headers,
etc.
<p>
<table border=1>
-<tr><tr><th>nick</th><th>From Line</th><th>type</th></tr>
+<tr><tr><th>nick</th><th>Disclaimer</th><th>From Line</th><th>type</th></tr>
<TMPL_LOOP NAME="usersupplied">
<TMPL_LOOP NAME="data">
<tr>
<td><TMPL_VAR NAME="nick"></td>
+ <td align="center"><TMPL_IF NAME="disclaim_top">top</TMPL_IF>&nbsp;<TMPL_IF NAME="disclaim_bot">bot</TMPL_IF></td>
<td><TMPL_VAR NAME="from"></td>
<td><small><TMPL_VAR NAME="types"></small></td>
</tr>