Bug 280500: Replace "DATE_FORMAT()" with Bugzilla::DB function call

Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=myk


git-svn-id: svn://10.0.0.236/trunk@169798 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%kerio.com
2005-02-24 23:37:48 +00:00
parent 2044f9b589
commit 2e945fe489
8 changed files with 36 additions and 22 deletions

View File

@@ -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");