Closed Bug 282128 Opened 20 years ago Closed 20 years ago

query.cgi: Eliminate deprecated Bugzilla::DB routines

Categories

(Bugzilla :: Query/Bug List, enhancement)

2.19.2
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

Time to tackle this page, now. Shouldn't be too hard, really.
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 2.20
Attachment #174230 - Flags: review?
Comment on attachment 174230 [details] [diff] [review]
Remove SendSQL calls from query.cgi

>+                my $query = $dbh->selectrow_array(
>+                    "SELECT query FROM namedqueries " .
>+                     "WHERE userid = ? AND name = ?",
>+                     undef, ($userid, $name));

Here, we select the query which has the $name name...

>                 if (!$query) {
>-                    SendSQL("INSERT INTO namedqueries " .
>+                    $dbh->do("INSERT INTO namedqueries " .
>                             "(userid, name, query) VALUES " .
>-                            "($userid, $qname, " . SqlQuote($value) . ")");
>+                            "(?, ?, ?)", undef, ($userid, $name, $query));
>                 }

... If this query does not exist yet, we add its $value to the DB! Why do you
replace $value by $query??
Attachment #174230 - Flags: review? → review-
Attached patch v2Splinter Review
OK, fixed that bit. :-)
Attachment #174230 - Attachment is obsolete: true
Attachment #174482 - Flags: review?(LpSolit)
Comment on attachment 174482 [details] [diff] [review]
v2

r=LpSolit
Attachment #174482 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval? → approval+
I checked this in even though it technically still has LOCK TABLES statements
inside of it. That will get handled when Tomas makes a new patch for the LOCK
TABLES bug.

Checking in query.cgi;
/cvsroot/mozilla/webtools/bugzilla/query.cgi,v  <--  query.cgi
new revision: 1.139; previous revision: 1.138
done
Status: ASSIGNED → RESOLVED
Closed: 20 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: