Commit fe07308b authored by jake%acutex.net's avatar jake%acutex.net

Fix for bug 103592 - e-mail addresses that are longer than 30 characters will be…

Fix for bug 103592 - e-mail addresses that are longer than 30 characters will be truncated in the bug list. Patch by Christian Reis <kiko@async.com.br> r= gerv@mozilla.org, afranke@ags.uni-sb.de, jake@acutex.net
parent b6c82303
......@@ -1201,6 +1201,9 @@ for (my $colcount = 0 ; $colcount < @collist ; $colcount++) {
my @weekday= qw( Sun Mon Tue Wed Thu Fri Sat );
# Truncate email to 30 chars per bug #103592
my $maxemailsize = 30;
while (@row = FetchSQLData()) {
my $bug_id = shift @row;
my $g = shift @row; # Bug's group set.
......@@ -1252,17 +1255,23 @@ while (@row = FetchSQLData()) {
}
if ($c eq "owner") {
$ownerhash{$value} = 1;
}elsif( $c eq 'changeddate' or $c eq 'opendate' ) {
my $age= time() - $value;
my ($s,$m,$h,$d,$mo,$y,$wd)= localtime $value;
if( $age < 18*60*60 ) {
$value= sprintf "%02d:%02d:%02d", $h,$m,$s;
}elsif( $age < 6*24*60*60 ) {
$value= sprintf "%s %02d:%02d", $weekday[$wd],$h,$m;
}else {
$value= sprintf "%04d-%02d-%02d", 1900+$y,$mo+1,$d;
}
}
}
if ( ($c eq "owner" || $c eq "qa_contact" ) &&
length $value > $maxemailsize ) {
my $trunc = substr $value, 0, $maxemailsize;
$value = value_quote($value);
$value = qq|<SPAN TITLE="$value">$trunc...</SPAN>|;
} elsif( $c eq 'changeddate' or $c eq 'opendate' ) {
my $age = time() - $value;
my ($s,$m,$h,$d,$mo,$y,$wd)= localtime $value;
if( $age < 18*60*60 ) {
$value = sprintf "%02d:%02d:%02d", $h,$m,$s;
} elsif ( $age < 6*24*60*60 ) {
$value = sprintf "%s %02d:%02d", $weekday[$wd],$h,$m;
} else {
$value = sprintf "%04d-%02d-%02d", 1900+$y,$mo+1,$d;
}
}
if ($::needquote{$c} || $::needquote{$c} == 5) {
$value = html_quote($value);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment