]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Updating the vote cache should not update the date-last-changed field
authorterry%mozilla.org <>
Tue, 12 Oct 1999 18:18:28 +0000 (18:18 +0000)
committerterry%mozilla.org <>
Tue, 12 Oct 1999 18:18:28 +0000 (18:18 +0000)
in the bug.

doeditvotes.cgi
globals.pl
sanitycheck.cgi

index c499af494226c596ca21f488c1f19028b621857c..2584d583b4691463ccbef24f0527119afb85392a 100755 (executable)
@@ -103,7 +103,7 @@ foreach my $id (@buglist) {
 foreach my $id (keys %affected) {
     SendSQL("select sum(count) from votes where bug_id = $id");
     my $v = FetchOneColumn();
-    SendSQL("update bugs set votes = $v where bug_id = $id");
+    SendSQL("update bugs set votes = $v, delta_ts=delta_ts where bug_id = $id");
 }
 SendSQL("unlock tables");
 
index ac18305e174a710c27a5f64780c108849bea011e..2f915ca5fea541f7b824c697d2c6d106c361f870 100644 (file)
@@ -535,7 +535,7 @@ sub RemoveVotes {
             close SENDMAIL;
         }
         SendSQL("delete from votes where bug_id = $id");
-        SendSQL("update bugs set votes = 0 where bug_id = $id");
+        SendSQL("update bugs set votes = 0, delta_ts=delta_ts where bug_id = $id");
     }
 }
 
index b1b2022eb01b0b00386274a866619b128c24ee9f..0805f063ae4d754e7601b57321de646fb20c442a 100755 (executable)
@@ -63,7 +63,7 @@ PutHeader("Bugzilla Sanity Check");
 if (exists $::FORM{'rebuildvotecache'}) {
     Status("OK, now rebuilding vote cache.");
     SendSQL("lock tables bugs write, votes read");
-    SendSQL("update bugs set votes = 0");
+    SendSQL("update bugs set votes = 0, delta_ts=delta_ts");
     SendSQL("select bug_id, sum(count) from votes group by bug_id");
     my %votes;
     while (@row = FetchSQLData()) {
@@ -71,10 +71,10 @@ if (exists $::FORM{'rebuildvotecache'}) {
         $votes{$id} = $v;
     }
     foreach my $id (keys %votes) {
-        SendSQL("update bugs set votes = $votes{$id} where bug_id = $id");
+        SendSQL("update bugs set votes = $votes{$id}, delta_ts=delta_ts where bug_id = $id");
     }
     SendSQL("unlock tables");
-    Status("Vote cache has been rebuild.");
+    Status("Vote cache has been rebuilt.");
 }
 
 print "OK, now running sanity checks.<P>\n";