summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-04-05 06:52:36 +0200
committerlpsolit%gmail.com <>2006-04-05 06:52:36 +0200
commitb0b4c4fce29ca6ea88675165f2e7f6100609e9e7 (patch)
treedd328e3a09409cd32e0e69968f6e1ca0e24e5c4a /Bugzilla/Flag.pm
parent7619511fe905991ffde812529a09115fff1d20e8 (diff)
downloadbugzilla-b0b4c4fce29ca6ea88675165f2e7f6100609e9e7.tar.gz
bugzilla-b0b4c4fce29ca6ea88675165f2e7f6100609e9e7.tar.xz
Bug 331343: The timestamp is quoted twice in Bugzilla::Flag::modify() - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
Diffstat (limited to 'Bugzilla/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index 7b074887a..a3929a970 100644
--- a/Bugzilla/Flag.pm
+++ b/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'}");