From 44420a05db816b4c2e732953a1b9847f36cfe457 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" Date: Tue, 4 Apr 2006 21:52:36 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20331343:=20The=20timestamp=20is=20quoted?= =?UTF-8?q?=20twice=20in=20Bugzilla::Flag::modify()=20-=20Patch=20by=20Fr?= =?UTF-8?q?=EF=BF=BDd=EF=BF=BDric=20Buclin=20=20r=3Dmka?= =?UTF-8?q?nat=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webtools/bugzilla/Bugzilla/Flag.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/webtools/bugzilla/Bugzilla/Flag.pm b/webtools/bugzilla/Bugzilla/Flag.pm index 7b074887aac..a3929a97059 100644 --- a/webtools/bugzilla/Bugzilla/Flag.pm +++ b/webtools/bugzilla/Bugzilla/Flag.pm @@ -437,6 +437,8 @@ sub process { # Use the date/time we were given if possible (allowing calling code # to synchronize the comment's timestamp with those of other records). + # XXX - we shouldn't quote the timestamp here, but this would involve + # many changes in this file. $timestamp = ($timestamp ? &::SqlQuote($timestamp) : "NOW()"); # Take a snapshot of flags before any changes. @@ -607,10 +609,6 @@ sub modify { my ($cgi, $timestamp) = @_; my $setter = Bugzilla->user; - # Use the date/time we were given if possible (allowing calling code - # to synchronize the comment's timestamp with those of other records). - my $sql_timestamp = ($timestamp ? &::SqlQuote($timestamp) : "NOW()"); - # Extract a list of flags from the form data. my @ids = map(/^flag-(\d+)$/ ? $1 : (), $cgi->param()); @@ -683,7 +681,7 @@ sub modify { SET setter_id = " . $setter->id . ", requestee_id = NULL , status = '$status' , - modification_date = $sql_timestamp , + modification_date = $timestamp , is_active = 1 WHERE id = $flag->{'id'}"); @@ -724,7 +722,7 @@ sub modify { SET setter_id = " . $setter->id . ", requestee_id = $requestee_id , status = '$status' , - modification_date = $sql_timestamp , + modification_date = $timestamp , is_active = 1 WHERE id = $flag->{'id'}");