aboutsummaryrefslogtreecommitdiffstats
path: root/votes.cgi
diff options
context:
space:
mode:
authorbbaetz%acm.org <>2003-04-27 14:20:36 +0000
committerbbaetz%acm.org <>2003-04-27 14:20:36 +0000
commit8449ddc1397a699e8473ee657b18e1ed6928f4bb (patch)
tree5a37c734d6bc56f529d0dd81537de76a0c0fd87e /votes.cgi
parentf016a7980404372d9855215a5107968beb3c82f4 (diff)
downloadbugs-8449ddc1397a699e8473ee657b18e1ed6928f4bb.tar
bugs-8449ddc1397a699e8473ee657b18e1ed6928f4bb.tar.gz
bugs-8449ddc1397a699e8473ee657b18e1ed6928f4bb.tar.bz2
bugs-8449ddc1397a699e8473ee657b18e1ed6928f4bb.tar.xz
bugs-8449ddc1397a699e8473ee657b18e1ed6928f4bb.zip
Bug 180086 - Rename 'count' column in votes tables
patch by bugzilla@chimpychompy.org (GavinS) r=bbaetz,justdave a=justdave
Diffstat (limited to 'votes.cgi')
-rwxr-xr-xvotes.cgi14
1 files changed, 7 insertions, 7 deletions
diff --git a/votes.cgi b/votes.cgi
index 6b35fc027..e386d5422 100755
--- a/votes.cgi
+++ b/votes.cgi
@@ -92,7 +92,7 @@ sub show_bug {
my $total = 0;
my @users;
- SendSQL("SELECT profiles.login_name, votes.who, votes.count
+ SendSQL("SELECT profiles.login_name, votes.who, votes.vote_count
FROM votes, profiles
WHERE votes.bug_id = $bug_id
AND profiles.userid = votes.who");
@@ -137,10 +137,10 @@ sub show_user {
if ($canedit && $bug_id) {
# Make sure there is an entry for this bug
# in the vote table, just so that things display right.
- SendSQL("SELECT votes.count FROM votes
+ SendSQL("SELECT votes.vote_count FROM votes
WHERE votes.bug_id = $bug_id AND votes.who = $who");
if (!FetchOneColumn()) {
- SendSQL("INSERT INTO votes (who, bug_id, count)
+ SendSQL("INSERT INTO votes (who, bug_id, vote_count)
VALUES ($who, $bug_id, 0)");
}
}
@@ -167,7 +167,7 @@ sub show_user {
my $total = 0;
my $onevoteonly = 0;
- SendSQL("SELECT votes.bug_id, votes.count, bugs.short_desc,
+ SendSQL("SELECT votes.bug_id, votes.vote_count, bugs.short_desc,
bugs.bug_status
FROM votes, bugs, products
WHERE votes.who = $who
@@ -207,7 +207,7 @@ sub show_user {
}
}
- SendSQL("DELETE FROM votes WHERE count <= 0");
+ SendSQL("DELETE FROM votes WHERE vote_count <= 0");
SendSQL("UNLOCK TABLES");
$vars->{'voting_user'} = { "login" => $name };
@@ -318,7 +318,7 @@ sub record_votes {
# Insert the new values in their place
foreach my $id (@buglist) {
if ($::FORM{$id} > 0) {
- SendSQL("INSERT INTO votes (who, bug_id, count)
+ SendSQL("INSERT INTO votes (who, bug_id, vote_count)
VALUES ($who, $id, $::FORM{$id})");
}
@@ -327,7 +327,7 @@ sub record_votes {
# Update the cached values in the bugs table
foreach my $id (keys %affected) {
- SendSQL("SELECT sum(count) FROM votes WHERE bug_id = $id");
+ SendSQL("SELECT sum(vote_count) FROM votes WHERE bug_id = $id");
my $v = FetchOneColumn();
$v ||= 0;
SendSQL("UPDATE bugs SET votes = $v, delta_ts=delta_ts