From: dmose%mozilla.org <> Date: Thu, 7 Dec 2000 11:04:31 +0000 (+0000) Subject: patch from Jake to fix bug 59515; adds a title attribute... X-Git-Tag: bugzilla-2.12~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7033a5f254f8545ef65ed77a51080dd62601a5a4;p=thirdparty%2Fbugzilla.git patch from Jake to fix bug 59515; adds a title attribute containing status and short description to various bug links. In some browsers (most Mozilla builds, at least) this makes the status and short description available as a tooltip, so it is no longer necessary to click through to see it. r=dmose@mozilla.org --- diff --git a/bug_form.pl b/bug_form.pl index e4fa39c6ef..3fd71c99e5 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -321,20 +321,21 @@ sub EmitDependList { my ($desc, $myfield, $targetfield) = (@_); print "$desc:"; my @list; - SendSQL("select dependencies.$targetfield, bugs.bug_status + SendSQL("select dependencies.$targetfield, bugs.bug_status, short_desc from dependencies, bugs where dependencies.$myfield = $id and bugs.bug_id = dependencies.$targetfield order by dependencies.$targetfield"); while (MoreSQLData()) { - my ($i, $stat) = (FetchSQLData()); + my ($i, $stat, $dep_desc) = (FetchSQLData()); push(@list, $i); my $opened = ($stat eq "NEW" || $stat eq "ASSIGNED" || $stat eq "REOPENED"); if (!$opened) { print ""; } - print qq{$i}; + $dep_desc = value_quote($dep_desc); + print qq{$i}; if (!$opened) { print ""; } diff --git a/globals.pl b/globals.pl index f8bb4e2173..bd1cf3ede9 100644 --- a/globals.pl +++ b/globals.pl @@ -676,15 +676,23 @@ sub quoteUrls { while ($text =~ s/\bbug(\s|%\#)*(\d+)/"##$count##"/ei) { my $item = $&; my $num = $2; + SendSQL("select bugs.bug_status, short_desc + from bugs where bugs.bug_id = $num"); + my ($stat, $dep_desc) = (FetchSQLData()); $item = value_quote($item); # Not really necessary, since we know # there's no special chars in it. - $item = qq{$item}; + $dep_desc = value_quote($dep_desc); + $item = qq{$item}; $things[$count++] = $item; } while ($text =~ s/\*\*\* This bug has been marked as a duplicate of (\d+) \*\*\*/"##$count##"/ei) { my $item = $&; my $num = $1; - $item =~ s@\d+@$num@; + SendSQL("select bugs.bug_status, short_desc + from bugs where bugs.bug_id = $num"); + my ($stat, $dep_desc) = (FetchSQLData()); + $dep_desc = value_quote($dep_desc); + $item =~ s@\d+@$num@; $things[$count++] = $item; } while ($text =~ s/Created an attachment \(id=(\d+)\)/"##$count##"/e) {