From 09a62e442b2d5665434ad87ff1f5198aad36d648 Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" <> Date: Thu, 8 Apr 1999 21:40:45 +0000 Subject: Bugzilla now has the ability to store patches and other attachments with bugs. --- bug_form.pl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'bug_form.pl') diff --git a/bug_form.pl b/bug_form.pl index 7398dae9f..40b96ecc7 100644 --- a/bug_form.pl +++ b/bug_form.pl @@ -22,6 +22,8 @@ use diagnostics; use strict; +my %knownattachments; + # This routine quoteUrls contains inspirations from the HTML::FromText CPAN # module by Gareth Rees . It has been heavily hacked, # all that is really recognizable from the original is bits of the regular @@ -73,6 +75,14 @@ sub quoteUrls { $item = qq{$item}; $things[$count++] = $item; } + while ($text =~ s/Created an attachment \(id=(\d+)\)/"##$count##"/e) { + my $item = $&; + my $num = $1; + if (exists $knownattachments{$num}) { + $item = qq{$item}; + } + $things[$count++] = $item; + } $text = value_quote($text); @@ -277,6 +287,20 @@ if (Param("usestatuswhiteboard")) { "; } +print "Attachments:\n"; +SendSQL("select attach_id, creation_ts, description from attachments where bug_id = $::FORM{'id'}"); +while (MoreSQLData()) { + my ($id, $date, $desc) = (FetchSQLData()); + if ($date =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) { + $date = "$3/$4/$2 $5:$6"; + } + my $link = "showattachment.cgi?attach_id=$id"; + $desc = value_quote($desc); + print qq{$date$desc}; + $knownattachments{$id} = 1; +} +print "Create a new attachment (proposed patch, testcase, etc.)\n"; + print " -- cgit v1.2.3-24-g4f1b