- From: Olivier Thereaux <ot@dev.w3.org>
- Date: Mon, 28 Jun 2004 22:59:12 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator/Output In directory hutz:/tmp/cvs-serv16663/lib/W3C/LogValidator/Output Modified Files: Mail.pm HTML.pm Log Message: adding support for specific title Index: HTML.pm =================================================================== RCS file: /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator/Output/HTML.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- HTML.pm 26 Aug 2003 20:06:07 -0000 1.8 +++ HTML.pm 28 Jun 2004 22:59:10 -0000 1.9 @@ -89,12 +89,19 @@ # and either save or output my $self = shift; + +my $title = "Logvalidator results"; +if (defined $config{"Title"}) + { + $title = $config{"Title"}; + } + my $result_string = '<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> -<title>LogValidator results</title> +<title>'.$title.'</title> <style type="text/css" media="screen"> h1 { @@ -139,7 +146,7 @@ <link rel="Stylesheet" href="http://www.w3.org/QA/Tools/LogValidator/logvalstyle" /> </head> <body> -<h1>Log Validator results</h1>'; +<h1>'.$title.'</h1>'; if (@_) { Index: Mail.pm =================================================================== RCS file: /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator/Output/Mail.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Mail.pm 8 Jun 2004 05:10:48 -0000 1.5 +++ Mail.pm 28 Jun 2004 22:59:10 -0000 1.6 @@ -58,14 +58,20 @@ { my $result_string = shift; my ($sec,$min,$hour,$day,$mon,$year,$wday,$yday) = gmtime(time); - my $hour = sprintf ( "%02d", $hour); - my $min = sprintf ( "%02d", $min); + $hour = sprintf ( "%02d", $hour); + $min = sprintf ( "%02d", $min); $mon ++; # weird 'feature': months run 0-11; days run 1-31 :-( my $date = ($year+1900) .'-'. ($mon>9 ? $mon:"0$mon") .'-'. ($day>9 ? $day:"0$day"); if (defined $config{"ServerAdmin"}) # we have someone to send the mail to { + my $mail_subject = "Logvalidator results"; + if (defined $config{"Title"}) + { + $mail_subject = $config{"Title"}; + } + $mail_subject = $mail_subject."($date $hour:$min GMT)"; my $add = $config{"ServerAdmin"}; my $mail_from = $add; if (defined $config{"MailFrom"}) @@ -75,7 +81,7 @@ use Mail::Sendmail; my %mail = (To => $add, From => "LogValidator <$mail_from>", - Subject => "Logvalidator results : $date at $hour:$min GMT", + Subject => "$mail_subject", 'X-Mailer' => "Mail::Sendmail version $Mail::Sendmail::VERSION", Message => $result_string ); print "Sending Mail to $add...\n" if ($verbose >1 );
Received on Monday, 28 June 2004 18:59:13 UTC