From f7b63bd7f86a028796283faf088062258151b8ed Mon Sep 17 00:00:00 2001 From: "bugzilla%glob.com.au" <> Date: Sun, 10 Jul 2005 20:34:32 +0000 Subject: Bug 297870: attachments table/list should show attachment creator Patch by Byron Jones r=LpSolit,a=justdave --- Bugzilla/Attachment.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Attachment.pm') diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 4d223d633..10fa6ddfc 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -75,7 +75,8 @@ sub query my $list = $dbh->selectall_arrayref("SELECT attach_id, " . $dbh->sql_date_format('creation_ts', '%Y.%m.%d %H:%i') . ", mimetype, description, ispatch, - isobsolete, isprivate, LENGTH(thedata) + isobsolete, isprivate, LENGTH(thedata), + submitter_id FROM attachments WHERE bug_id = ? ORDER BY attach_id", undef, $bugid); @@ -85,7 +86,9 @@ sub query my %a; ($a{'attachid'}, $a{'date'}, $a{'contenttype'}, $a{'description'}, $a{'ispatch'}, $a{'isobsolete'}, - $a{'isprivate'}, $a{'datasize'}) = @$row; + $a{'isprivate'}, $a{'datasize'}, $a{'submitter_id'}) = @$row; + + $a{'submitter'} = new Bugzilla::User($a{'submitter_id'}); # Retrieve a list of flags for this attachment. $a{'flags'} = Bugzilla::Flag::match({ 'attach_id' => $a{'attachid'}, -- cgit v1.2.3-24-g4f1b