Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Themes are ordered by filename, and not by info name on admin/build/themes.
Comment | File | Size | Author |
---|---|---|---|
#6 | sort-admin-themes-by-info-name.txt | 672 bytes | rstamm |
#2 | sort-by-info-name.patch | 907 bytes | Pancho |
#1 | sort-themes-by-info-name2.txt | 1.2 KB | rstamm |
sort-themes-by-info-name.txt | 934 bytes | rstamm |
Comments
Comment #1
rstamm CreditAttribution: rstamm commentedThis patch reduces redundant code.
Comment #2
PanchoChanging D6 API is not acceptable anymore. Therefore I removed everything that might break contrib modules.
+1 The rest is okay for now and makes sense.
Don't forget to leave this open after committing in D6, to commit the rest of the patch in #1 for D7.
Comment #3
dropcube CreditAttribution: dropcube commentedTested. The themes are ordered by info name correctly after applying the patch. It changes the sort function from
ksort
touasort
and uses the comparison functionsystem_sort_modules_by_info_name
.Comment #4
Gábor HojtsyThanks, committed. It would be great to rename that function in D7, so it reflects what it does actually.
Comment #5
dropcube CreditAttribution: dropcube commentedRename the function
system_sort_modules_by_info_name
tosystem_sort_by_info_name
as suggested in #1The callback function is used to sort modules and themes, not only modules.
Comment #6
rstamm CreditAttribution: rstamm commentedAdministration themes are ordered by filename, and not by info name.
Comment #7
Pancho+1 The same thing in green... looks good, is a one-liner, and works as expected. RTBC?
Comment #8
dropcube CreditAttribution: dropcube commentedIt works fine, and is RTBC as far as I can see.
Check also this issue a theme listing table is also displayed at the users account edit page if they have "select different theme".
Comment #9
PanchoOh my god... I just took a look at all these places where themes are being listed. There is so much code duplication and it's all spread out in system.module, system.admin.inc and theme.inc. Well, for now I guess, we can't change that, but maybe we should put that on our wishlist for D7...?
Just a notice of mine, the patch is indeed okay.
Comment #10
dropcube CreditAttribution: dropcube commentedPancho: Yes, there is a lot code duplication that should be grouped and reused in the theme listing forms.
The patch in this issue or the patch in that issue ?. I noted that you have reviewed this patch before.
Comment #11
PanchoThis one here, of course. Comments to the other patch obviously belong to #211051...
There are two reasons I set this back to CNR, though:
Any suggestions?
Comment #12
Gábor HojtsyPancho: Let's not wrestle with modifying how the admin theme list looks. I committed the patch in #6 to improve listing consistency. I'd say Drupal 7 should have an admin theme selection as part of the themes settings page, not this separated, so duplicating the screenshot based theme list is not the way to go IMHO.
Comment #13
PanchoNo need for wrestling... I'm convinced! :)
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.