Commit ed20d719 authored by travis%sedsystems.ca's avatar travis%sedsystems.ca

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
parent fc649d47
...@@ -415,8 +415,7 @@ sub ProcessOneBug($) { ...@@ -415,8 +415,7 @@ sub ProcessOneBug($) {
} }
SendSQL("UPDATE bugs SET lastdiffed = '$end', delta_ts = delta_ts " . SendSQL("UPDATE bugs SET lastdiffed = '$end' WHERE bug_id = $id");
"WHERE bug_id = $id");
# Filter the exclude list for dupes one last time # Filter the exclude list for dupes one last time
@excludedAddresses = filterExcludeList(\@excludedAddresses, @excludedAddresses = filterExcludeList(\@excludedAddresses,
......
...@@ -246,27 +246,28 @@ sub CheckIfVotedConfirmed { ...@@ -246,27 +246,28 @@ sub CheckIfVotedConfirmed {
my ($id, $who) = (@_); my ($id, $who) = (@_);
PushGlobalSQLState(); PushGlobalSQLState();
SendSQL("SELECT bugs.votes, bugs.bug_status, products.votestoconfirm, " . SendSQL("SELECT bugs.votes, bugs.bug_status, products.votestoconfirm, " .
" bugs.everconfirmed " . " bugs.everconfirmed, NOW() " .
"FROM bugs, products " . "FROM bugs, products " .
"WHERE bugs.bug_id = $id AND products.id = bugs.product_id"); "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; my $ret = 0;
if ($votes >= $votestoconfirm && $status eq $::unconfirmedstate) { if ($votes >= $votestoconfirm && $status eq $::unconfirmedstate) {
SendSQL("UPDATE bugs SET bug_status = 'NEW', everconfirmed = 1 " . SendSQL("UPDATE bugs SET bug_status = 'NEW', everconfirmed = 1, " .
"WHERE bug_id = $id"); "delta_ts = $now WHERE bug_id = $id");
my $fieldid = GetFieldID("bug_status"); my $fieldid = GetFieldID("bug_status");
SendSQL("INSERT INTO bugs_activity " . SendSQL("INSERT INTO bugs_activity " .
"(bug_id,who,bug_when,fieldid,removed,added) VALUES " . "(bug_id,who,bug_when,fieldid,removed,added) VALUES " .
"($id,$who,now(),$fieldid,'$::unconfirmedstate','NEW')"); "($id,$who,$now,$fieldid,'$::unconfirmedstate','NEW')");
if (!$everconfirmed) { if (!$everconfirmed) {
$fieldid = GetFieldID("everconfirmed"); $fieldid = GetFieldID("everconfirmed");
SendSQL("INSERT INTO bugs_activity " . SendSQL("INSERT INTO bugs_activity " .
"(bug_id,who,bug_when,fieldid,removed,added) VALUES " . "(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), 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->{'type'} = "votes";
$vars->{'id'} = $id; $vars->{'id'} = $id;
......
...@@ -940,7 +940,7 @@ sub insert ...@@ -940,7 +940,7 @@ sub insert
@newvalues = map(SqlQuote($_), @newvalues); @newvalues = map(SqlQuote($_), @newvalues);
# Update the bug record. Note that this doesn't involve login_name. # Update the bug record. Note that this doesn't involve login_name.
SendSQL("UPDATE bugs SET " . SendSQL("UPDATE bugs SET delta_ts = $sql_timestamp, " .
join(", ", map("$fields[$_] = $newvalues[$_]", (0..2))) . join(", ", map("$fields[$_] = $newvalues[$_]", (0..2))) .
" WHERE bug_id = $::FORM{'bugid'}"); " WHERE bug_id = $::FORM{'bugid'}");
......
...@@ -1753,7 +1753,7 @@ $table{bugs} = ...@@ -1753,7 +1753,7 @@ $table{bugs} =
bug_severity enum($my_severities) not null, bug_severity enum($my_severities) not null,
bug_status enum("UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED", "RESOLVED", "VERIFIED", "CLOSED") not null, bug_status enum("UNCONFIRMED", "NEW", "ASSIGNED", "REOPENED", "RESOLVED", "VERIFIED", "CLOSED") not null,
creation_ts datetime not null, creation_ts datetime not null,
delta_ts timestamp not null, delta_ts datetime not null,
short_desc mediumtext not null, short_desc mediumtext not null,
op_sys enum($my_opsys) not null, op_sys enum($my_opsys) not null,
priority enum($my_priorities) not null, priority enum($my_priorities) not null,
...@@ -4689,6 +4689,13 @@ if ($emptygroupid) { ...@@ -4689,6 +4689,13 @@ if ($emptygroupid) {
print "Group $emptygroupid had an empty name; renamed as '$trygroupname'.\n"; print "Group $emptygroupid had an empty name; renamed as '$trygroupname'.\n";
} }
# 2005-01-17 - Tomas.Kopal@altap.cz, bug 257315
# Change bugs.delta_ts type from timestamp to datetime
if (($fielddef = GetFieldDef("bugs", "delta_ts")) &&
$fielddef->[1] =~ /^timestamp/) {
ChangeFieldType ('bugs', 'delta_ts', 'DATETIME NOT NULL');
}
# #
# Final checks... # Final checks...
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
# #
# You need to work with bug_email.pl the MIME::Parser installed. # You need to work with bug_email.pl the MIME::Parser installed.
# #
# $Id: bug_email.pl,v 1.20 2004/04/09 02:23:09 jocuri%softhome.net Exp $ # $Id: bug_email.pl,v 1.21 2005/01/28 19:01:28 travis%sedsystems.ca Exp $
############################################################### ###############################################################
# 02/12/2000 (SML) # 02/12/2000 (SML)
...@@ -1085,7 +1085,7 @@ END ...@@ -1085,7 +1085,7 @@ END
my $reporter = ""; my $reporter = "";
my $query = "insert into bugs (\n" . join(",\n", @used_fields ) . my $query = "insert into bugs (\n" . join(",\n", @used_fields ) .
", bug_status, creation_ts, everconfirmed) values ( "; ", bug_status, creation_ts, delta_ts, everconfirmed) values ( ";
# 'Yuck'. Then again, this whole file should be rewritten anyway... # 'Yuck'. Then again, this whole file should be rewritten anyway...
$query =~ s/product/product_id/; $query =~ s/product/product_id/;
...@@ -1140,7 +1140,7 @@ END ...@@ -1140,7 +1140,7 @@ END
$state = SqlQuote("NEW"); $state = SqlQuote("NEW");
} }
$query .= $state . ", \'$bug_when\', $ever_confirmed)\n"; $query .= $state . ", \'$bug_when\', \'$bug_when\', $ever_confirmed)\n";
# $query .= SqlQuote( "NEW" ) . ", now(), " . SqlQuote($comment) . " )\n"; # $query .= SqlQuote( "NEW" ) . ", now(), " . SqlQuote($comment) . " )\n";
SendSQL("SELECT userid FROM profiles WHERE login_name=\'$reporter\'"); SendSQL("SELECT userid FROM profiles WHERE login_name=\'$reporter\'");
......
...@@ -208,6 +208,7 @@ def process_jitterbug(filename): ...@@ -208,6 +208,7 @@ def process_jitterbug(filename):
"bug_severity='normal'," \ "bug_severity='normal'," \
"bug_status=%s," \ "bug_status=%s," \
"creation_ts=%s," \ "creation_ts=%s," \
"delta_ts=%s," \
"short_desc=%s," \ "short_desc=%s," \
"product=%s," \ "product=%s," \
"rep_platform='All'," \ "rep_platform='All'," \
...@@ -219,6 +220,7 @@ def process_jitterbug(filename): ...@@ -219,6 +220,7 @@ def process_jitterbug(filename):
[ current['number'], [ current['number'],
bug_status, bug_status,
time.strftime("%Y-%m-%d %H:%M:%S", current['date-reported'][:9]), time.strftime("%Y-%m-%d %H:%M:%S", current['date-reported'][:9]),
time.strftime("%Y-%m-%d %H:%M:%S", current['date-reported'][:9]),
current['short-description'], current['short-description'],
product, product,
reporter, reporter,
......
...@@ -548,8 +548,7 @@ if ($action eq 'update') { ...@@ -548,8 +548,7 @@ if ($action eq 'update') {
trick_taint($milestoneold); trick_taint($milestoneold);
$dbh->do('UPDATE bugs $dbh->do('UPDATE bugs
SET target_milestone = ?, SET target_milestone = ?
delta_ts = delta_ts
WHERE target_milestone = ? WHERE target_milestone = ?
AND product_id = ?', AND product_id = ?',
undef, undef,
......
...@@ -1176,12 +1176,12 @@ if ($action eq 'updategroupcontrols') { ...@@ -1176,12 +1176,12 @@ if ($action eq 'updategroupcontrols') {
my ($removed, $timestamp) = FetchSQLData(); my ($removed, $timestamp) = FetchSQLData();
LogActivityEntry($bugid, "bug_group", $removed, "", LogActivityEntry($bugid, "bug_group", $removed, "",
$::userid, $timestamp); $::userid, $timestamp);
my $diffed = "";
if ($mailiscurrent != 0) { if ($mailiscurrent != 0) {
SendSQL("UPDATE bugs SET lastdiffed = " . SqlQuote($timestamp) $diffed = ", lastdiffed = " . SqlQuote($timestamp);
. " WHERE bug_id = $bugid");
} }
SendSQL("UPDATE bugs SET delta_ts = " . SqlQuote($timestamp) SendSQL("UPDATE bugs SET delta_ts = " . SqlQuote($timestamp) .
. " WHERE bug_id = $bugid"); $diffed . " WHERE bug_id = $bugid");
PopGlobalSQLState(); PopGlobalSQLState();
$count++; $count++;
} }
...@@ -1210,12 +1210,12 @@ if ($action eq 'updategroupcontrols') { ...@@ -1210,12 +1210,12 @@ if ($action eq 'updategroupcontrols') {
my ($added, $timestamp) = FetchSQLData(); my ($added, $timestamp) = FetchSQLData();
LogActivityEntry($bugid, "bug_group", "", $added, LogActivityEntry($bugid, "bug_group", "", $added,
$::userid, $timestamp); $::userid, $timestamp);
my $diffed = "";
if ($mailiscurrent != 0) { if ($mailiscurrent != 0) {
SendSQL("UPDATE bugs SET lastdiffed = " . SqlQuote($timestamp) $diffed = ", lastdiffed = " . SqlQuote($timestamp);
. " WHERE bug_id = $bugid");
} }
SendSQL("UPDATE bugs SET delta_ts = " . SqlQuote($timestamp) SendSQL("UPDATE bugs SET delta_ts = " . SqlQuote($timestamp) .
. " WHERE bug_id = $bugid"); $diffed . " WHERE bug_id = $bugid");
PopGlobalSQLState(); PopGlobalSQLState();
$count++; $count++;
} }
......
...@@ -418,8 +418,7 @@ if ($action eq 'update') { ...@@ -418,8 +418,7 @@ if ($action eq 'update') {
exit; exit;
} }
SendSQL("UPDATE bugs SendSQL("UPDATE bugs
SET version=" . SqlQuote($version) . ", SET version=" . SqlQuote($version) . "
delta_ts = delta_ts
WHERE version=" . SqlQuote($versionold) . " WHERE version=" . SqlQuote($versionold) . "
AND product_id = $product_id"); AND product_id = $product_id");
SendSQL("UPDATE versions SendSQL("UPDATE versions
......
...@@ -138,7 +138,7 @@ sub AppendComment { ...@@ -138,7 +138,7 @@ sub AppendComment {
"VALUES($bugid, $whoid, $timestamp, " . SqlQuote($comment) . ", " . "VALUES($bugid, $whoid, $timestamp, " . SqlQuote($comment) . ", " .
$privacyval . ", " . SqlQuote($work_time) . ")"); $privacyval . ", " . SqlQuote($work_time) . ")");
SendSQL("UPDATE bugs SET delta_ts = now() WHERE bug_id = $bugid"); SendSQL("UPDATE bugs SET delta_ts = $timestamp WHERE bug_id = $bugid");
} }
sub GetFieldID { sub GetFieldID {
...@@ -1420,8 +1420,7 @@ sub RemoveVotes { ...@@ -1420,8 +1420,7 @@ sub RemoveVotes {
SendSQL("SELECT SUM(vote_count) FROM votes WHERE bug_id = $id"); SendSQL("SELECT SUM(vote_count) FROM votes WHERE bug_id = $id");
my $v = FetchOneColumn(); my $v = FetchOneColumn();
$v ||= 0; $v ||= 0;
SendSQL("UPDATE bugs SET votes = $v, delta_ts = delta_ts " . SendSQL("UPDATE bugs SET votes = $v WHERE bug_id = $id");
"WHERE bug_id = $id");
} }
} }
......
...@@ -339,13 +339,21 @@ for (my $k=1 ; $k <= $bugqty ; $k++) { ...@@ -339,13 +339,21 @@ for (my $k=1 ; $k <= $bugqty ; $k++) {
my @query = (); my @query = ();
my @values = (); my @values = ();
foreach my $field ( qw(creation_ts delta_ts status_whiteboard) ) { foreach my $field ( qw(creation_ts status_whiteboard) ) {
if ( (defined $bug_fields{$field}) && ($bug_fields{$field}) ){ if ( (defined $bug_fields{$field}) && ($bug_fields{$field}) ){
push (@query, "$field"); push (@query, "$field");
push (@values, SqlQuote($bug_fields{$field})); push (@values, SqlQuote($bug_fields{$field}));
} }
} }
push (@query, "delta_ts");
if ( (defined $bug_fields{'delta_ts'}) && ($bug_fields{'delta_ts'}) ){
push (@values, SqlQuote($bug_fields{'delta_ts'}));
}
else {
push (@values, "NOW()");
}
if ( (defined $bug_fields{'bug_file_loc'}) && ($bug_fields{'bug_file_loc'}) ){ if ( (defined $bug_fields{'bug_file_loc'}) && ($bug_fields{'bug_file_loc'}) ){
push (@query, "bug_file_loc"); push (@query, "bug_file_loc");
push (@values, SqlQuote($bug_fields{'bug_file_loc'})); push (@values, SqlQuote($bug_fields{'bug_file_loc'}));
......
...@@ -122,8 +122,10 @@ foreach my $id (split(/:/, scalar($cgi->param('buglist')))) { ...@@ -122,8 +122,10 @@ foreach my $id (split(/:/, scalar($cgi->param('buglist')))) {
"(bug_id,who,bug_when,fieldid,removed,added) VALUES " . "(bug_id,who,bug_when,fieldid,removed,added) VALUES " .
"($id,$exporterid,now(),$fieldid,'$cur_res','MOVED')"); "($id,$exporterid,now(),$fieldid,'$cur_res','MOVED')");
SendSQL("UPDATE bugs SET bug_status =\"RESOLVED\" where bug_id=\"$id\""); SendSQL("UPDATE bugs SET bug_status =\"RESOLVED\",
SendSQL("UPDATE bugs SET resolution =\"MOVED\" where bug_id=\"$id\""); resolution =\"MOVED\",
delta_ts = NOW()
WHERE bug_id=\"$id\"");
my $comment = ""; my $comment = "";
if (defined $cgi->param('comment') && $cgi->param('comment') !~ /^\s*$/) { if (defined $cgi->param('comment') && $cgi->param('comment') !~ /^\s*$/) {
......
...@@ -321,9 +321,14 @@ if (UserInGroup("editbugs") && defined($::FORM{'dependson'})) { ...@@ -321,9 +321,14 @@ if (UserInGroup("editbugs") && defined($::FORM{'dependson'})) {
} }
} }
# get current time
SendSQL("SELECT NOW()");
my $timestamp = FetchOneColumn();
# Build up SQL string to add bug. # Build up SQL string to add bug.
my $sql = "INSERT INTO bugs " . my $sql = "INSERT INTO bugs " .
"(" . join(",", @used_fields) . ", reporter, creation_ts, " . "(" . join(",", @used_fields) . ", reporter, creation_ts, delta_ts, " .
"estimated_time, remaining_time, deadline) " . "estimated_time, remaining_time, deadline) " .
"VALUES ("; "VALUES (";
...@@ -337,7 +342,7 @@ $comment = trim($comment); ...@@ -337,7 +342,7 @@ $comment = trim($comment);
# OK except for the fact that it causes e-mail to be suppressed. # OK except for the fact that it causes e-mail to be suppressed.
$comment = $comment ? $comment : " "; $comment = $comment ? $comment : " ";
$sql .= "$::userid, now(), "; $sql .= "$::userid, $timestamp, $timestamp, ";
# Time Tracking # Time Tracking
if (UserInGroup(Param("timetrackinggroup")) && if (UserInGroup(Param("timetrackinggroup")) &&
...@@ -414,9 +419,6 @@ while (MoreSQLData()) { ...@@ -414,9 +419,6 @@ while (MoreSQLData()) {
# Add the bug report to the DB. # Add the bug report to the DB.
SendSQL($sql); SendSQL($sql);
SendSQL("select now()");
my $timestamp = FetchOneColumn();
# Get the bug ID back. # Get the bug ID back.
SendSQL("select LAST_INSERT_ID()"); SendSQL("select LAST_INSERT_ID()");
my $id = FetchOneColumn(); my $id = FetchOneColumn();
...@@ -456,8 +458,8 @@ if (UserInGroup("editbugs")) { ...@@ -456,8 +458,8 @@ if (UserInGroup("editbugs")) {
while (MoreSQLData()) { while (MoreSQLData()) {
push (@list, FetchOneColumn()); push (@list, FetchOneColumn());
} }
SendSQL("UPDATE bugs SET keywords = " . SendSQL("UPDATE bugs SET delta_ts = $timestamp," .
SqlQuote(join(', ', @list)) . " keywords = " . SqlQuote(join(', ', @list)) .
" WHERE bug_id = $id"); " WHERE bug_id = $id");
} }
if (defined $::FORM{'dependson'}) { if (defined $::FORM{'dependson'}) {
......
...@@ -1112,14 +1112,14 @@ sub FindWrapPoint { ...@@ -1112,14 +1112,14 @@ sub FindWrapPoint {
} }
sub LogDependencyActivity { sub LogDependencyActivity {
my ($i, $oldstr, $target, $me) = (@_); my ($i, $oldstr, $target, $me, $timestamp) = (@_);
my $newstr = SnapShotDeps($i, $target, $me); my $newstr = SnapShotDeps($i, $target, $me);
if ($oldstr ne $newstr) { if ($oldstr ne $newstr) {
# Figure out what's really different... # Figure out what's really different...
my ($removed, $added) = diff_strings($oldstr, $newstr); my ($removed, $added) = diff_strings($oldstr, $newstr);
LogActivityEntry($i,$target,$removed,$added,$whoid,$timestamp); LogActivityEntry($i,$target,$removed,$added,$whoid,$timestamp);
# update timestamp on target bug so midairs will be triggered # update timestamp on target bug so midairs will be triggered
SendSQL("UPDATE bugs SET delta_ts=NOW() WHERE bug_id=$i"); SendSQL("UPDATE bugs SET delta_ts=$timestamp WHERE bug_id=$i");
$bug_changed = 1; $bug_changed = 1;
return 1; return 1;
} }
...@@ -1403,7 +1403,7 @@ foreach my $id (@idlist) { ...@@ -1403,7 +1403,7 @@ foreach my $id (@idlist) {
while (MoreSQLData()) { while (MoreSQLData()) {
push(@list, FetchOneColumn()); push(@list, FetchOneColumn());
} }
SendSQL("UPDATE bugs SET keywords = " . SendSQL("UPDATE bugs SET delta_ts = $timestamp, keywords = " .
SqlQuote(join(', ', @list)) . SqlQuote(join(', ', @list)) .
" WHERE bug_id = $id"); " WHERE bug_id = $id");
} }
...@@ -1558,9 +1558,9 @@ foreach my $id (@idlist) { ...@@ -1558,9 +1558,9 @@ foreach my $id (@idlist) {
SendSQL("insert into dependencies ($me, $target) values ($id, $i)"); SendSQL("insert into dependencies ($me, $target) values ($id, $i)");
} }
foreach my $k (@keys) { foreach my $k (@keys) {
LogDependencyActivity($k, $snapshot{$k}, $me, $target); LogDependencyActivity($k, $snapshot{$k}, $me, $target, $timestamp);
} }
LogDependencyActivity($id, $oldsnap, $target, $me); LogDependencyActivity($id, $oldsnap, $target, $me, $timestamp);
$check_dep_bugs = 1; $check_dep_bugs = 1;
} }
...@@ -1804,7 +1804,10 @@ foreach my $id (@idlist) { ...@@ -1804,7 +1804,10 @@ foreach my $id (@idlist) {
SendSQL("INSERT INTO cc (who, bug_id) VALUES ($reporter, " . SqlQuote($duplicate) . ")"); SendSQL("INSERT INTO cc (who, bug_id) VALUES ($reporter, " . SqlQuote($duplicate) . ")");
} }
# Bug 171639 - Duplicate notifications do not need to be private. # Bug 171639 - Duplicate notifications do not need to be private.
AppendComment($duplicate, Bugzilla->user->login, "*** Bug $::FORM{'id'} has been marked as a duplicate of this bug. ***", 0); AppendComment($duplicate, Bugzilla->user->login,
"*** Bug $::FORM{'id'} has been marked as a duplicate of this bug. ***",
0, $timestamp);
CheckFormFieldDefined(\%::FORM,'comment'); CheckFormFieldDefined(\%::FORM,'comment');
SendSQL("INSERT INTO duplicates VALUES ($duplicate, $::FORM{'id'})"); SendSQL("INSERT INTO duplicates VALUES ($duplicate, $::FORM{'id'})");
......
...@@ -98,7 +98,7 @@ PutHeader("Bugzilla Sanity Check"); ...@@ -98,7 +98,7 @@ PutHeader("Bugzilla Sanity Check");
if (defined $cgi->param('rebuildvotecache')) { if (defined $cgi->param('rebuildvotecache')) {
Status("OK, now rebuilding vote cache."); Status("OK, now rebuilding vote cache.");
SendSQL("LOCK TABLES bugs WRITE, votes READ"); SendSQL("LOCK TABLES bugs WRITE, votes READ");
SendSQL("UPDATE bugs SET votes = 0, delta_ts = delta_ts"); SendSQL("UPDATE bugs SET votes = 0");
SendSQL("SELECT bug_id, SUM(vote_count) FROM votes GROUP BY bug_id"); SendSQL("SELECT bug_id, SUM(vote_count) FROM votes GROUP BY bug_id");
my %votes; my %votes;
while (@row = FetchSQLData()) { while (@row = FetchSQLData()) {
...@@ -106,7 +106,7 @@ if (defined $cgi->param('rebuildvotecache')) { ...@@ -106,7 +106,7 @@ if (defined $cgi->param('rebuildvotecache')) {
$votes{$id} = $v; $votes{$id} = $v;
} }
foreach my $id (keys %votes) { foreach my $id (keys %votes) {
SendSQL("UPDATE bugs SET votes = $votes{$id}, delta_ts = delta_ts WHERE bug_id = $id"); SendSQL("UPDATE bugs SET votes = $votes{$id} WHERE bug_id = $id");
} }
SendSQL("UNLOCK TABLES"); SendSQL("UNLOCK TABLES");
Status("Vote cache has been rebuilt."); Status("Vote cache has been rebuilt.");
...@@ -588,8 +588,7 @@ if (@badbugs) { ...@@ -588,8 +588,7 @@ if (@badbugs) {
if (exists($realk{$b})) { if (exists($realk{$b})) {
$k = $realk{$b}; $k = $realk{$b};
} }
SendSQL("UPDATE bugs SET delta_ts = delta_ts, keywords = " . SendSQL("UPDATE bugs SET keywords = " . SqlQuote($k) .
SqlQuote($k) .
" WHERE bug_id = $b"); " WHERE bug_id = $b");
} }
Status("Keyword cache fixed."); Status("Keyword cache fixed.");
......
...@@ -343,8 +343,7 @@ sub record_votes { ...@@ -343,8 +343,7 @@ sub record_votes {
foreach my $id (keys %affected) { foreach my $id (keys %affected) {
SendSQL("SELECT sum(vote_count) FROM votes WHERE bug_id = $id"); SendSQL("SELECT sum(vote_count) FROM votes WHERE bug_id = $id");
my $v = FetchOneColumn() || 0; my $v = FetchOneColumn() || 0;
SendSQL("UPDATE bugs SET votes = $v, delta_ts=delta_ts SendSQL("UPDATE bugs SET votes = $v WHERE bug_id = $id");
WHERE bug_id = $id");
my $confirmed = CheckIfVotedConfirmed($id, $who); my $confirmed = CheckIfVotedConfirmed($id, $who);
$vars->{'header_done'} = 1 if $confirmed; $vars->{'header_done'} = 1 if $confirmed;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment