From 63dde60072374b2f7ef2f756d4ab9dff66669793 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Fri, 25 Feb 2005 07:37:47 +0000 Subject: Bug 280500: Replace "DATE_FORMAT()" with Bugzilla::DB function call Patch By Tomas Kopal r=mkanat, a=myk --- Bugzilla/Attachment.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Attachment.pm') diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index 5f491f315..8be92dcf2 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -67,6 +67,8 @@ sub query # "attachments" variable. my ($bugid) = @_; + my $dbh = Bugzilla->dbh; + my $in_editbugs = &::UserInGroup("editbugs"); &::SendSQL("SELECT product_id FROM bugs @@ -76,9 +78,9 @@ sub query # Retrieve a list of attachments for this bug and write them into an array # 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, + &::SendSQL("SELECT attach_id, " . + $dbh->sql_date_format('creation_ts', '%Y.%m.%d %H:%i') . + ", mimetype, description, ispatch, isobsolete, isprivate, submitter_id, LENGTH(thedata) FROM attachments WHERE bug_id = $bugid ORDER BY attach_id "); -- cgit v1.2.1