Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#2370 closed enhancement (fixed)

Small get_editable_authors function change: adding ORDER BY in the SQL

Reported by: paologabrielligmailcom's profile paolo.gabrielli@… 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)

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

Download all attachments as: .zip

Change History (6)

#1 @davidhouse
18 years ago

  • Keywords bg|has-patch added

#2 @Nazgul
18 years ago

  • Keywords has-patch added; bg|has-patch removed
  • Milestone changed from 2.1 to 2.0.5

Candidate fo 2.0.5.

#3 @markjaquith
18 years ago

  • Resolution set to fixed
  • Status changed from new to closed

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

#4 @markjaquith
18 years ago

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

#5 @(none)
17 years ago

  • Milestone 2.0.5 deleted

Milestone 2.0.5 deleted

Note: See TracTickets for help on using tickets.