Ticket #2370 (closed enhancement: fixed)
Small get_editable_authors function change: adding ORDER BY in the SQL
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | lowest | Milestone: | |
| Component: | Administration | Version: | 2.0 |
| Severity: | normal | Keywords: | get_editable_authors display_name order has-patch |
| Cc: |
Description
Hi,
working with over 40 authors make me think that it's better to have that function (get_editable_authors()) ORDERing the result BY display_name because that field is the one in the select's output.
Doing so will result in a quicker author selection if you have a lot of authors, like I have.
Thank you,
P.
Index: admin-db.php
===================================================================
--- admin-db.php (revision 3503)
+++ admin-db.php (working copy)
@@ -34,7 +34,7 @@
return false;
} else {
$editable = join(',', $editable);
- $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable)" );
+ $authors = $wpdb->get_results( "SELECT * FROM $wpdb->users WHERE ID IN ($editable) ORDER BY display_name" );
}
return apply_filters('get_editable_authors', $authors);
Attachments
Change History
- Keywords has-patch added; bg|has-patch removed
- Milestone changed from 2.1 to 2.0.5
Candidate fo 2.0.5.
comment:3
markjaquith — 5 years ago
- Status changed from new to closed
- Resolution set to fixed
comment:4
markjaquith — 5 years ago
Note: See
TracTickets for help on using
tickets.

