diff options
author | jocuri%softhome.net <> | 2004-12-29 08:38:03 +0100 |
---|---|---|
committer | jocuri%softhome.net <> | 2004-12-29 08:38:03 +0100 |
commit | 36b498ed9adb315297dc45217cc0646ef05127dc (patch) | |
tree | 3b182e635adaa38527825eeb5da01877c4652bda /Bugzilla | |
parent | 3b8318a1a38c6b6c652e560139788e0ca22351e0 (diff) | |
download | bugzilla-36b498ed9adb315297dc45217cc0646ef05127dc.tar.gz bugzilla-36b498ed9adb315297dc45217cc0646ef05127dc.tar.xz |
Patch for bug 273339: Make attachment.cgi consistent with its activity log timestamps; patch by GavinS <bugzilla@chimpychompy.org>, r=vladd, a=justdave.
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Flag.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 0fd4b047f..6661cac5e 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -360,12 +360,16 @@ sub migrate { # Moves a flag from one attachment to another. Useful for migrating # a flag from an obsolete attachment to the attachment that obsoleted it. - my ($old_attach_id, $new_attach_id) = @_; + my ($old_attach_id, $new_attach_id, $timestamp) = @_; + + # Use the date/time we were given if possible (allowing calling code + # to synchronize the comment's timestamp with those of other records). + $timestamp = ($timestamp ? &::SqlQuote($timestamp) : "NOW()"); # Update the record in the flags table to point to the new attachment. &::SendSQL("UPDATE flags " . "SET attach_id = $new_attach_id , " . - " modification_date = NOW() " . + " modification_date = $timestamp " . "WHERE attach_id = $old_attach_id"); } |