summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-03-22 17:36:49 +0000
committerfukachan <fukachan>2001-03-22 17:36:49 +0000
commitcda6407be1f62cd04dc8be97900c03bacbd91a52 (patch)
treee5da4473cffebbd16d1046b55a2019a85782da41 /fml
parentead4739669bb533859ece8a9c058a710831518ac (diff)
downloadfml8-cda6407be1f62cd04dc8be97900c03bacbd91a52.tar.gz
fml8-cda6407be1f62cd04dc8be97900c03bacbd91a52.tar.bz2
fml8-cda6407be1f62cd04dc8be97900c03bacbd91a52.zip
filter mail header like strings more and more for more smart summary
_header_summary() is changed to method() to accept $self attributes.
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/Ticket/Model/minimal_states.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/fml/lib/FML/Ticket/Model/minimal_states.pm b/fml/lib/FML/Ticket/Model/minimal_states.pm
index 5af66bee..7f27a9a2 100644
--- a/fml/lib/FML/Ticket/Model/minimal_states.pm
+++ b/fml/lib/FML/Ticket/Model/minimal_states.pm
@@ -740,9 +740,10 @@ sub _article_summary
next LINE if /^Mime-[-A-Za-z0-9]+:/i;
next LINE if /^Content-[-A-Za-z0-9]+:/i;
next LINE if /^(To|From|Subject|Reply-To|Received):/i;
+ next LINE if /^(Message-ID|Date):/i;
# pick up effetive the first $line lines
- if ($line--> 0) {
+ if ($line-- > 0) {
$buf .= $padding. $_;
}
else {
@@ -755,7 +756,7 @@ sub _article_summary
use FML::Header;
my $h = new FML::Header \@header;
- my $header_info = _header_summary({
+ my $header_info = $self->_header_summary({
header => $h,
padding => $padding,
});
@@ -766,7 +767,7 @@ sub _article_summary
sub _header_summary
{
- my ($args) = @_;
+ my ($self, $args) = @_;
my $from = $args->{ header }->get('from');
my $subject = $args->{ header }->get('subject');
my $padding = $args->{ padding };
@@ -779,9 +780,10 @@ sub _header_summary
$from = decode_mime_string($from, { charset => 'euc-japan' });
$from =~ s/\n/ /g;
+ my $br = '<BR>' if $self->{ _mode } eq 'html';
return
- $padding. " From: ". $from ."\n".
- $padding. "Subject: ". $subject ."\n";
+ $padding. " From: ". $from ."$br\n".
+ $padding. "Subject: ". $subject ."$br\n";
}
@@ -906,7 +908,6 @@ sub _show_ticket_by_html_table
$aid = (split(/\s+/, $articles))[0];
my $buf = $self->_article_summary( $spool_dir ."/". $aid );
- $buf =~ s/\n/<BR>\n/g;
use Language::ISO2022JP qw(STR2EUC);
print STR2EUC($buf);
}