#2370 closed enhancement (fixed)
Small get_editable_authors function change: adding ORDER BY in the SQL
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | lowest | |
| Severity: | normal | Version: | 2.0 |
| Component: | Administration | Keywords: | get_editable_authors display_name order has-patch |
| Focuses: | 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 (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.
Candidate fo 2.0.5.