Closed Bug 300551 Opened 19 years ago Closed 18 years ago

Eliminate deprecated Bugzilla::DB routines from User.pm and Token.pm

Categories

(Bugzilla :: Bugzilla-General, enhancement)

2.21
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

Attachments

(2 files, 1 obsolete file)

.
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 2.22
Target Milestone: Bugzilla 2.22 → Bugzilla 2.24
I prefer to submit two patches... one for Token.pm, another one for User.pm.
Attachment #213827 - Flags: review?(wicked)
Attached patch patch for User.pm, v1 (obsolete) — Splinter Review
And here is the one for User.pm. I did a big cleanup in User::match().
Attachment #213839 - Flags: review?(wicked)
Blocks: 312508
Comment on attachment 213827 [details] [diff] [review]
patch for Token.pm, v1

>+    my ($issuedate, $tokentype, $eventdata, $loginname, $realname) =
>+        $dbh->selectrow_array('SELECT ' . $dbh->sql_date_format('issuedate') . ',
>+                                      tokentype , eventdata , login_name , realname

Nit: Remove extra spaces before commas so that this line fits inside 80 chars.
Attachment #213827 - Flags: review?(wicked) → review+
Comment on attachment 213839 [details] [diff] [review]
patch for User.pm, v1

>-                      "LENGTH(login_name) AS namelength " .
>-        $query     .= " ORDER BY namelength";

Removing these lines from the two queries changes the list that is returned for limited lists. I don't think login name length was a good sort but changing this to an unspecified DB order (?) doesn't sound right either. Maybe instead order the results with login_name and/or realname to get consistent lists?
Attachment #213839 - Flags: review?(wicked) → review-
Attachment #213839 - Attachment is obsolete: true
Attachment #214251 - Flags: review?(wicked)
Comment on attachment 214251 [details] [diff] [review]
patch for User.pm, v2

Seems to still work. Even on Pg.
Attachment #214251 - Flags: review?(wicked) → review+
Flags: approval?
Flags: approval? → approval+
Checking in Bugzilla/Token.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Token.pm,v  <--  Token.pm
new revision: 1.40; previous revision: 1.39
done
Checking in Bugzilla/User.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v  <--  User.pm
new revision: 1.103; previous revision: 1.102
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
No longer blocks: 312508
You need to log in before you can comment on or make changes to this bug.