From 0b01a89cc8901ad0217455563c58b26c10f6dad7 Mon Sep 17 00:00:00 2001 From: "myk%mozilla.org" <> Date: Fri, 6 Feb 2004 02:14:01 +0000 Subject: Fix for bug 127995: shows the size of attachments in the show bug and attachment interfaces. Patch by Dave Swegen r=myk a=myk --- Bugzilla/Attachment.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Attachment.pm') diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index ea5cd531c..84979d3ea 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -77,7 +77,8 @@ sub query # of hashes in which each hash represents a single attachment. &::SendSQL(" SELECT attach_id, DATE_FORMAT(creation_ts, '%Y.%m.%d %H:%i'), - mimetype, description, ispatch, isobsolete, isprivate, submitter_id + mimetype, description, ispatch, isobsolete, isprivate, + submitter_id, LENGTH(thedata) FROM attachments WHERE bug_id = $bugid ORDER BY attach_id "); my @attachments = (); @@ -85,8 +86,8 @@ sub query my %a; my $submitter_id; ($a{'attachid'}, $a{'date'}, $a{'contenttype'}, $a{'description'}, - $a{'ispatch'}, $a{'isobsolete'}, $a{'isprivate'}, $submitter_id) - = &::FetchSQLData(); + $a{'ispatch'}, $a{'isobsolete'}, $a{'isprivate'}, $submitter_id, + $a{'datasize'}) = &::FetchSQLData(); # Retrieve a list of flags for this attachment. $a{'flags'} = Bugzilla::Flag::match({ 'attach_id' => $a{'attachid'} }); -- cgit v1.2.3-24-g4f1b