summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-10-12 04:44:46 +0200
committerjake%acutex.net <>2001-10-12 04:44:46 +0200
commitfe07308ba08eeb17b99f33c0a1cc19d89c010afb (patch)
tree647c28373890a0c7912de66a885391f5344472d9 /buglist.cgi
parentb6c823039a872aaf285d9d85ac5316135b8443c0 (diff)
downloadbugzilla-fe07308ba08eeb17b99f33c0a1cc19d89c010afb.tar.gz
bugzilla-fe07308ba08eeb17b99f33c0a1cc19d89c010afb.tar.xz
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
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi31
1 files changed, 20 insertions, 11 deletions
diff --git a/buglist.cgi b/buglist.cgi
index ad569e118..144972d37 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -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 {