Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
3 Nov 2010 at 14:39 UTC
Updated:
3 Jan 2014 at 02:04 UTC
Jump to comment: Most recent
system_sort_by_title() is too useful to be deeply hidden in system.admin.inc.
We already have drupal_sort_weight() in common.inc, so system_sort_by_title() should simply be drupal_sort_title().
| Comment | File | Size | Author |
|---|---|---|---|
| drupal.sort-title.0.patch | 2.02 KB | sun |
Comments
Comment #1
dries commentedWhat about making both functions consistent? One has _by_ in its name, the other one has not. :/
Comment #2
sunYeah - renaming those uasort() helper functions to have _by_ in their names would be a good idea, but that's not possible to do for D7, so it is better to have both drupal_sort_*() functions use a consistent naming.
Comment #3
dries commentedFair enough. Committed.
Comment #4
eric_a commentedQuick fix? Erhm, should we just hope that this very useful function was hidden so deeply that no contrib module was using it in its original form...?
EDIT: Agreed, how many people will include system.admin.inc just to reuse this bit of code, but still...
Comment #5
sun@Eric_A: Yup, let's just hope that. If I wouldn't know almost any line of code in Drupal core, then I wouldn't have remotely considered that this function exists - and it exists in D7 only, so that alone vastly decreases the amount of potentially affected modules.