Ticket #2370 (closed enhancement: fixed)

Opened 2 years ago

Last modified 1 year ago

Small get_editable_authors function change: adding ORDER BY in the SQL

Reported by: paolo.gabrielli@gmail.com Assigned to: anonymous
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

admin-db.patch.diff (502 bytes) - added by paolo.gabrielli@gmail.com on 02/01/06 23:33:12.

Change History

02/01/06 23:33:12 changed by paolo.gabrielli@gmail.com

  • attachment admin-db.patch.diff added.

02/02/06 18:42:37 changed by davidhouse

  • keywords changed from get_editable_authors display_name order to get_editable_authors display_name order bg|has-patch.

10/06/06 02:35:19 changed by Nazgul

  • keywords changed from get_editable_authors display_name order bg|has-patch to get_editable_authors display_name order has-patch.
  • milestone changed from 2.1 to 2.0.5.

Candidate fo 2.0.5.

10/10/06 04:16:14 changed by markjaquith

  • status changed from new to closed.
  • resolution set to fixed.

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

10/10/06 04:16:29 changed by markjaquith

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

11/30/06 19:41:51 changed by

  • milestone deleted.

Milestone 2.0.5 deleted