My recent module_weight patch distorted important pages, like the admin/access one. So I added a $sort parameter to module_list and used it here and there. There is no functional change with this one. It just reads better.

Comments

markus_petrux’s picture

Could you please add the sort option to module_implements() ?

markus_petrux’s picture

Status: Reviewed & tested by the community » Needs work
markus_petrux’s picture

I believe there's a bug in the patch. If $refresh is true, $sorted_list is not initialized.

markus_petrux’s picture

Version: 4.7.0-beta4 » x.y.z
Status: Needs work » Needs review

I hope you don't mind. I have re-rolled the patch with the following changes:

1) fixed the $sort_list issue.
2) implemented the $sort argument in module_implements() as well.
3) Revised usage of this new functionality for filter.module and user.module
4) Ditto for help.module, but included the changes in another issue that I believe cleans the help page a little too.

Please, review.

markus_petrux’s picture

StatusFileSize
new5.38 KB
chx’s picture

Status: Needs review » Reviewed & tested by the community
markus_petrux’s picture

Status: Reviewed & tested by the community » Needs work

Due to the replacement of www.drupal.org with drupal.org, the patch does not apply cleanly.

:-(

markus_petrux’s picture

Just want to propose a simple exercise. Have you tried to find something in admin/access ? Well, this patch would help you a little, sorting modules alphabetically.

chx’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new5.52 KB

Rerolled.

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Active

I've only partially apllied the patch, omitting most of the user output places. I think that sorting by weight woudl make more sense for example for filters. Setting to active to we can discuss this.

markus_petrux’s picture

hmmm... if there is a big list of filters, I believe it is easier, from the user point of view, to see the list alphabetically sorted. The order modules are loaded is not important to list available filters, IMO.

markus_petrux’s picture

...this is the list of available filters. even, if this list is sorted by weight, the filters will be applied in the order the user has selected later.

I don't get why sorting by weight here is important. Could you please elaborate?

OTH, it's more user friendly to scroll the list if it is sorted alphabetically, I think.

markus_petrux’s picture

So... anyone up to discuss this? :-)

How do you like to see the filters, ordered by weight or alphabetically?

moshe weitzman’s picture

I'll just add that themes do not currently consider weight at all now and although i see a ksort() in the selector form, it doesn;t appear to work right.

magico’s picture

What is the purpose of this? Is there any bug or is this a patch for a new feature (allow sort on tables)?

chx’s picture

Assigned: chx » Unassigned
coreb’s picture

Version: x.y.z » 5.x-dev

Moving out of the "x.y.z" queue to a real queue.

I can't figure out where this needs to go, so I'm guessing 5.x-dev. Change it if i'm wrong.

dave reid’s picture

Status: Active » Fixed

$sort parameter have been added to module_list and module_implements. Closing this issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.