Closed
Bug 300549
Opened 19 years ago
Closed 18 years ago
Eliminate deprecated Bugzilla::DB routines from Flag.pm and FlagType.pm
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Bugzilla
Bugzilla-General
Tracking
()
RESOLVED
FIXED
Bugzilla 3.0
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file)
24.02 KB,
patch
|
wicked
:
review+
|
Details | Diff | Splinter Review |
.
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 2.22
Assignee | ||
Comment 1•19 years ago
|
||
Deprecated DB routines have been removed from Attachment.pm thanks to myk's patch in bug 302669. Updating the summary accordingly.
Summary: Eliminate deprecated Bugzilla::DB routines from Attachment.pm, Flag.pm and FlagType.pm → Eliminate deprecated Bugzilla::DB routines from Flag.pm and FlagType.pm
Assignee | ||
Updated•19 years ago
|
Target Milestone: Bugzilla 2.22 → Bugzilla 2.24
Comment 2•19 years ago
|
||
Duping to the bug I have a patch for.... *** This bug has been marked as a duplicate of 317149 ***
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Updated•19 years ago
|
Assignee: LpSolit → general
Target Milestone: Bugzilla 2.24 → ---
Version: 2.21 → unspecified
Assignee | ||
Updated•19 years ago
|
Status: RESOLVED → REOPENED
Depends on: 304699
Resolution: DUPLICATE → ---
Target Milestone: --- → Bugzilla 2.24
Assignee | ||
Updated•19 years ago
|
Assignee: general → LpSolit
Status: REOPENED → NEW
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•19 years ago
|
||
*** Bug 317149 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•18 years ago
|
Assignee | ||
Comment 4•18 years ago
|
||
As future(?) improvements, we could try to: - force sqlify_criteria() to separate the SQL fragment from values and to return them separately; - convert the column list in FlagType.pm to be a constant, but this would involve a lot of work due to the way sqlify_criteria() works, i.e. altering this list depending on your requests. Anyway, as I plan to rewrite Flag.pm and FlagType.pm in bug 304699 very soon now (to use real flag objects), I won't waste too much time on it here.
Attachment #218682 -
Flags: review?(wicked+bz)
Comment 5•18 years ago
|
||
Comment on attachment 218682 [details] [diff] [review] patch, v1 Looks ok, passes tests and atleast seems to work on few simple flag related changes I did. >Index: Bugzilla/Flag.pm >=================================================================== >@@ -192,7 +149,7 @@ > =item C<count($criteria)> >-Queries the database for flags matching the given criteria >+Queries the database for flags matching the given criteria > (specified as a hash of field names and their matching values) > and returns an array of matching records. Nit: Correct rest of the comment while you are at it. Surely this doesn't return an array of matches.. >+ $dbh->do('UPDATE bugs SET delta_ts = ? WHERE bug_id = ?', >+ undef, $timestamp, $bug_id); Nit: Multiple values, so add brackets like in others. >Index: Bugzilla/FlagType.pm >=================================================================== >- my $select_clause = "SELECT " . join(", ", @base_columns); >- my $from_clause = "FROM " . join(" ", @base_tables); >+ my $columns = join(", ", @base_columns); >+ my @data = $dbh->selectrow_array("SELECT $columns FROM flagtypes Nit: Since base_tables has not removed from other places, don't remove it from here either. This is for consistency in case the list is changed later. >Index: sanitycheck.cgi >=================================================================== >-my @open_states = map(SqlQuote($_), BUG_STATE_OPEN); >+my @open_states = map($dbh->quote($_), BUG_STATE_OPEN); Oops, sorry about letting that SqlQuote in there. :)
Attachment #218682 -
Flags: review?(wicked+bz) → review+
Updated•18 years ago
|
Flags: approval?
Updated•18 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 6•18 years ago
|
||
Checking in attachment.cgi; /cvsroot/mozilla/webtools/bugzilla/attachment.cgi,v <-- attachment.cgi new revision: 1.109; previous revision: 1.108 done Checking in editusers.cgi; /cvsroot/mozilla/webtools/bugzilla/editusers.cgi,v <-- editusers.cgi new revision: 1.120; previous revision: 1.119 done Checking in sanitycheck.cgi; /cvsroot/mozilla/webtools/bugzilla/sanitycheck.cgi,v <-- sanitycheck.cgi new revision: 1.113; previous revision: 1.112 done Checking in Bugzilla/Flag.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Flag.pm,v <-- Flag.pm new revision: 1.63; previous revision: 1.62 done Checking in Bugzilla/FlagType.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/FlagType.pm,v <-- FlagType.pm new revision: 1.26; previous revision: 1.25 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago → 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•