From 6108f94ecbb260912f434fd87e99d2af231860be Mon Sep 17 00:00:00 2001 From: fukachan Date: Sun, 23 Dec 2001 14:12:51 +0000 Subject: check $filename is valid in showing
  • ... --- fml/lib/Mail/HTML/Lite.pm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'fml/lib/Mail/HTML') diff --git a/fml/lib/Mail/HTML/Lite.pm b/fml/lib/Mail/HTML/Lite.pm index 687d33b7..67d1b806 100644 --- a/fml/lib/Mail/HTML/Lite.pm +++ b/fml/lib/Mail/HTML/Lite.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Lite.pm,v 1.31 2001/11/17 15:21:18 fukachan Exp $ +# $FML: Lite.pm,v 1.32 2001/12/22 09:21:18 fukachan Exp $ # package Mail::HTML::Lite; @@ -15,7 +15,7 @@ use Carp; my $debug = $ENV{'debug'} ? 1 : 0; my $URL = "Mail::HTML::Lite"; -my $version = q$FML: Lite.pm,v 1.31 2001/11/17 15:21:18 fukachan Exp $; +my $version = q$FML: Lite.pm,v 1.32 2001/12/22 09:21:18 fukachan Exp $; if ($version =~ /,v\s+([\d\.]+)\s+/) { $version = "$URL $1"; } @@ -1967,14 +1967,16 @@ sub _print_li_filename my $subject = $db->{ _subject }->{ $id }; my $who = $db->{ _who }->{ $id }; - _print_raw_str($wh, "\n", $code); + if (defined $filename && $filename && -f $filename) { + _print_raw_str($wh, "\n", $code); - _print_raw_str($wh, "
  • \n", $code); - _print_raw_str($wh, "\n", $code); - _print_safe_str($wh, $subject, $code); - _print_raw_str($wh, ",\n", $code); - _print_safe_str($wh, "$who\n", $code); - _print_raw_str($wh, "\n", $code); + _print_raw_str($wh, "
  • \n", $code); + _print_raw_str($wh, "\n", $code); + _print_safe_str($wh, $subject, $code); + _print_raw_str($wh, ",\n", $code); + _print_safe_str($wh, "$who\n", $code); + _print_raw_str($wh, "\n", $code); + } } -- cgit v1.2.1