Make WordPress Core

Opened 21 years ago

Closed 20 years ago

Last modified 20 years ago

#2370 closed enhancement (fixed)

Small get_editable_authors function change: adding ORDER BY in the SQL

Reported by: paolo.gabrielli@… Owned by:
Priority: lowest Milestone:
Component: Administration Version: 2.0
Severity: normal Keywords: get_editable_authors display_name order has-patch
Cc: Focuses:

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)

admin-db.patch.diff (502 bytes ) - added by paolo.gabrielli@… 21 years ago.

Download all attachments as: .zip

Change History (6)

#1 @davidhouse
21 years ago

  • Keywords bg|has-patch added

#2 @Nazgul
20 years ago

  • Keywords has-patch added; bg|has-patch removed
  • Milestone 2.12.0.5

Candidate fo 2.0.5.

#3 @markjaquith
20 years ago

  • Resolutionfixed
  • Status newclosed

(In [4364]) Order get_editable_authors() by display_name. Props Paolo Gabrielli. fixes #2370

#4 @markjaquith
20 years ago

(In [4365]) Order get_editable_authors() by display_name. Props Paolo Gabrielli. fixes #2370

#5 @(none)
20 years ago

  • Milestone 2.0.5

Milestone 2.0.5 deleted

Note: See TracTickets for help on using tickets.