Closed Bug 303700 Opened 19 years ago Closed 19 years ago

Eliminate deprecated Bugzilla::DB routines from votes.cgi

Categories

(Bugzilla :: Bugzilla-General, defect)

2.21
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.22

People

(Reporter: wicked, Assigned: LpSolit)

References

Details

Attachments

(1 file)

These lines need to rewritten to use DBI:

votes.cgi:98:    SendSQL("SELECT profiles.login_name, votes.who, votes.vote_count
votes.cgi:103:    while (MoreSQLData()) {
votes.cgi:104:        my ($name, $userid, $count) = (FetchSQLData());
votes.cgi:142:        SendSQL("SELECT votes.vote_count FROM votes
votes.cgi:144:        if (!FetchOneColumn()) {
votes.cgi:145:            SendSQL("INSERT INTO votes (who, bug_id, vote_count)
votes.cgi:154:        SendSQL("SELECT products.name, products.maxvotesperbug
votes.cgi:156:        while (MoreSQLData()) {
votes.cgi:157:            my ($prod, $max) = FetchSQLData();
votes.cgi:172:        SendSQL("SELECT votes.bug_id, votes.vote_count,
bugs.short_desc,
votes.cgi:178:                    AND products.name = " . SqlQuote($product) .
votes.cgi:181:        while (MoreSQLData()) {
votes.cgi:182:            my ($id, $count, $summary, $status) = FetchSQLData();
votes.cgi:216:    SendSQL("DELETE FROM votes WHERE vote_count <= 0");
votes.cgi:283:        SendSQL("SELECT bugs.bug_id, products.name,
products.maxvotesperbug
votes.cgi:291:        while (MoreSQLData()) {
votes.cgi:292:            my ($id, $prod, $max) = FetchSQLData();
votes.cgi:331:    SendSQL("SELECT bug_id FROM votes WHERE who = $who");
votes.cgi:332:    while (MoreSQLData()) {
votes.cgi:333:        my $id = FetchOneColumn();
votes.cgi:337:    SendSQL("DELETE FROM votes WHERE who = $who");
votes.cgi:342:            SendSQL("INSERT INTO votes (who, bug_id, vote_count)
votes.cgi:351:        SendSQL("SELECT sum(vote_count) FROM votes WHERE bug_id =
$id");
votes.cgi:352:        my $v = FetchOneColumn() || 0;
votes.cgi:353:        SendSQL("UPDATE bugs SET votes = $v WHERE bug_id = $id");
Assignee: general → LpSolit
Target Milestone: --- → Bugzilla 2.22
Attached patch patch, v1Splinter Review
Attachment #194196 - Flags: review?(wurblzap)
Comment on attachment 194196 [details] [diff] [review]
patch, v1

Marc said he was too busy these days; asking joel for review.
Attachment #194196 - Flags: review?(wurblzap) → review?(bugreport)
Comment on attachment 194196 [details] [diff] [review]
patch, v1

r=joel
Attachment #194196 - Flags: review?(bugreport) → review+
Flags: approval?
Flags: approval? → approval+
Checking in votes.cgi;
/cvsroot/mozilla/webtools/bugzilla/votes.cgi,v  <--  votes.cgi
new revision: 1.33; previous revision: 1.32
done
Checking in template/en/default/filterexceptions.pl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/filterexceptions.pl,v 
<--  filterexceptions.pl
new revision: 1.53; previous revision: 1.52
done
Checking in template/en/default/bug/votes/list-for-bug.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/votes/list-for-bug.html.tmpl,v
 <--  list-for-bug.html.tmpl
new revision: 1.10; previous revision: 1.9
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: