diff options
author | mkanat%kerio.com <> | 2005-02-25 07:37:47 +0000 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-02-25 07:37:47 +0000 |
commit | 63dde60072374b2f7ef2f756d4ab9dff66669793 (patch) | |
tree | 294b30fddd43508bc9fa4d8c3c540ac4bbcd3c8c /attachment.cgi | |
parent | 32882b6e3513fa69185ea5b3d115e70b69ea5362 (diff) | |
download | bugs-63dde60072374b2f7ef2f756d4ab9dff66669793.tar bugs-63dde60072374b2f7ef2f756d4ab9dff66669793.tar.gz bugs-63dde60072374b2f7ef2f756d4ab9dff66669793.tar.bz2 bugs-63dde60072374b2f7ef2f756d4ab9dff66669793.tar.xz bugs-63dde60072374b2f7ef2f756d4ab9dff66669793.zip |
Bug 280500: Replace "DATE_FORMAT()" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=myk
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-x | attachment.cgi | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/attachment.cgi b/attachment.cgi index 0a296609b..92d127e1a 100755 --- a/attachment.cgi +++ b/attachment.cgi @@ -800,11 +800,14 @@ sub viewall # Retrieve the attachments from the database and write them into an array # of hashes where each hash represents one attachment. my $privacy = ""; + my $dbh = Bugzilla->dbh; + if (Param("insidergroup") && !(UserInGroup(Param("insidergroup")))) { $privacy = "AND isprivate < 1 "; } - 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, LENGTH(thedata) FROM attachments WHERE bug_id = $::FORM{'bugid'} $privacy ORDER BY attach_id"); |