Opened 2 years ago
Last modified 4 months ago
#15828 accepted enhancement
Alphabetized My Sites
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Multisite | Version: | |
| Severity: | minor | Keywords: | has-patch needs-testing |
| Cc: |
Description
For installs that have lots of sites it would be easier to browse if the sites are alphabetized. I add the following code to our install after each update. It would be nice if this was the default.
after line 72: reset( $blogs );
function cmp($a, $b){
if ($a->blogname == $b->blogname)return 0;
else return ($a->blogname < $b->blogname) ? -1 : 1;
}
uasort($blogs, 'cmp');
Attachments (1)
Change History (4)
comment:2
jakub.tyrcha — 2 years ago
- Keywords has-patch needs-testing added
- Owner set to jakub.tyrcha
- Status changed from new to accepted
jakub.tyrcha — 2 years ago
comment:3
technosailor — 4 months ago
This patch needs a refresh, but I like the concept personally.
Note: See
TracTickets for help on using
tickets.

I don't think the original idea is a good solution - get_blogs_of_user is called in several places and doing a sort outside of this function doesn't make any good. Instead, I propose to introduce internal sorting - it looks much better and does a better job. Patch attached. Also, I improved it to allow sorting by every variable, not only the blogname.