summaryrefslogtreecommitdiffstats
path: root/bug_form.pl
diff options
context:
space:
mode:
authormyk%mozilla.org <>2001-08-31 12:54:25 +0200
committermyk%mozilla.org <>2001-08-31 12:54:25 +0200
commit880e86c82eb67a6940e2a38e74c7e66dafb44743 (patch)
tree564680d0c4d636b7ea1ce9129598d07747fb509d /bug_form.pl
parent0e9bbc0b0cf55e2da4d5e4ea30ba8a02324d6265 (diff)
downloadbugzilla-880e86c82eb67a6940e2a38e74c7e66dafb44743.tar.gz
bugzilla-880e86c82eb67a6940e2a38e74c7e66dafb44743.tar.xz
Fix for bug 84338: initial implementation of attachment tracker, which lets users flag attachments with statuses.
Patch by Myk Melez <myk@mozilla.org> r=justdave@syndicomm.com
Diffstat (limited to 'bug_form.pl')
-rw-r--r--bug_form.pl28
1 files changed, 18 insertions, 10 deletions
diff --git a/bug_form.pl b/bug_form.pl
index c554cb0b0..d2f6cc3f4 100644
--- a/bug_form.pl
+++ b/bug_form.pl
@@ -283,18 +283,26 @@ if (@::legal_keywords) {
};
}
-print "<tr><td align=right><B>Attachments:</b></td>\n";
-SendSQL("select attach_id, creation_ts, mimetype, description from attachments where bug_id = $id");
-while (MoreSQLData()) {
- my ($attachid, $date, $mimetype, $desc) = (FetchSQLData());
- if ($date =~ /^(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/) {
- $date = "$3/$4/$2 $5:$6";
+# 2001-05-16 myk@mozilla.org: use the attachment tracker to display attachments
+# if this installation has enabled use of the attachment tracker.
+if (Param('useattachmenttracker')) {
+ print "</table>\n";
+ use Attachment;
+ &Attachment::list($id);
+} else {
+ print "<tr><td align=right><B>Attachments:</b></td>\n";
+ SendSQL("select attach_id, creation_ts, mimetype, description from attachments where bug_id = $id");
+ while (MoreSQLData()) {
+ my ($attachid, $date, $mimetype, $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=$attachid";
+ $desc = value_quote($desc);
+ print qq{<td><a href="$link">$date</a></td><td colspan=6>$desc&nbsp;&nbsp;&nbsp;($mimetype)</td></tr><tr><td></td>};
}
- my $link = "showattachment.cgi?attach_id=$attachid";
- $desc = value_quote($desc);
- print qq{<td><a href="$link">$date</a></td><td colspan=6>$desc&nbsp;&nbsp;&nbsp;($mimetype)</td></tr><tr><td></td>};
+ print "<td colspan=7><a href=\"createattachment.cgi?id=$id\">Create a new attachment</a> (proposed patch, testcase, etc.)</td></tr></table>\n";
}
-print "<td colspan=7><a href=\"createattachment.cgi?id=$id\">Create a new attachment</a> (proposed patch, testcase, etc.)</td></tr></table>\n";
sub EmitDependList {