Bug 657290: Bug.add_attachment() stores truncated timestamps in the DB (seconds are missing)

r=dkl a=mkanat


git-svn-id: svn://10.0.0.236/branches/BUGZILLA-4_0-BRANCH@263137 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org
2011-12-06 12:05:31 +00:00
parent 6df13f362e
commit de0268f582
2 changed files with 5 additions and 2 deletions

View File

@@ -639,9 +639,12 @@ sub add_attachment {
my @created;
$dbh->bz_start_transaction();
my $timestamp = $dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
foreach my $bug (@bugs) {
my $attachment = Bugzilla::Attachment->create({
bug => $bug,
creation_ts => $timestamp,
data => $params->{data},
description => $params->{summary},
filename => $params->{file_name},
@@ -657,7 +660,7 @@ sub add_attachment {
extra_data => $attachment->id });
push(@created, $attachment);
}
$_->bug->update($_->attached) foreach @created;
$_->bug->update($timestamp) foreach @created;
$dbh->bz_commit_transaction();
$_->send_changes() foreach @bugs;