summaryrefslogtreecommitdiffstats
path: root/CGI.pl
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-01-29 04:01:27 +0100
committertravis%sedsystems.ca <>2005-01-29 04:01:27 +0100
commited20d719e2df695ed2c9127f364886b902d82a24 (patch)
tree78e3a5205b856822753ff44d7e49f6b967b1d86d /CGI.pl
parentfc649d472490ea13b935eccf1ecd692dd7112fd4 (diff)
downloadbugzilla-ed20d719e2df695ed2c9127f364886b902d82a24.tar.gz
bugzilla-ed20d719e2df695ed2c9127f364886b902d82a24.tar.xz
Bug 257315 : type of delta_ts in bugs table should not be timestamp
Patch by Tomas Kopal <Tomas.Kopal@altap.cz> r=vladd, LpSolit a=justdave
Diffstat (limited to 'CGI.pl')
-rw-r--r--CGI.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/CGI.pl b/CGI.pl
index 165e5216c..4d7b34047 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -246,27 +246,28 @@ sub CheckIfVotedConfirmed {
my ($id, $who) = (@_);
PushGlobalSQLState();
SendSQL("SELECT bugs.votes, bugs.bug_status, products.votestoconfirm, " .
- " bugs.everconfirmed " .
+ " bugs.everconfirmed, NOW() " .
"FROM bugs, products " .
"WHERE bugs.bug_id = $id AND products.id = bugs.product_id");
- my ($votes, $status, $votestoconfirm, $everconfirmed) = (FetchSQLData());
+ my ($votes, $status, $votestoconfirm, $everconfirmed, $now) = (FetchSQLData());
my $ret = 0;
if ($votes >= $votestoconfirm && $status eq $::unconfirmedstate) {
- SendSQL("UPDATE bugs SET bug_status = 'NEW', everconfirmed = 1 " .
- "WHERE bug_id = $id");
+ SendSQL("UPDATE bugs SET bug_status = 'NEW', everconfirmed = 1, " .
+ "delta_ts = $now WHERE bug_id = $id");
my $fieldid = GetFieldID("bug_status");
SendSQL("INSERT INTO bugs_activity " .
"(bug_id,who,bug_when,fieldid,removed,added) VALUES " .
- "($id,$who,now(),$fieldid,'$::unconfirmedstate','NEW')");
+ "($id,$who,$now,$fieldid,'$::unconfirmedstate','NEW')");
if (!$everconfirmed) {
$fieldid = GetFieldID("everconfirmed");
SendSQL("INSERT INTO bugs_activity " .
"(bug_id,who,bug_when,fieldid,removed,added) VALUES " .
- "($id,$who,now(),$fieldid,'0','1')");
+ "($id,$who,$now,$fieldid,'0','1')");
}
AppendComment($id, DBID_to_name($who),
- "*** This bug has been confirmed by popular vote. ***", 0);
+ "*** This bug has been confirmed by popular vote. ***",
+ 0, $now);
$vars->{'type'} = "votes";
$vars->{'id'} = $id;