[drupal-devel] [task] list_themes() improvements

drumm drupal-devel at drupal.org
Tue Aug 16 22:58:53 UTC 2005


Issue status update for 
http://drupal.org/node/29002
Post a follow up: 
http://drupal.org/project/comments/add/29002

 Project:      Drupal
 Version:      cvs
 Component:    theme system
 Category:     tasks
 Priority:     normal
 Assigned to:  drumm
 Reported by:  drumm
 Updated by:   drumm
 Status:       patch (code needs review)
 Attachment:   http://drupal.org/files/issues/list_themes.patch (2.77 KB)

list_themes() currently returns all themes, not just enabled themes.
This functionality is only used in one place- configuration for
disabled themes. These configuration pages can be removed with a
usability improvement since you shouldn't be able to configure things
which are disabled. Additionally, this allows us to remove some extra
logic in system_user(). And it it more consistent with the module API
which only lists enabled modules.


list_themes() sorts the results by name. This uses filesort in MySQL
since there aren't any indexes. Sorting is not used except in
system_user(). This one use can be handled with ksort since it is not
often executed (only on the user edit screen when multiple themes are
enabled).


And a one line fix to remove a variable in system_user() is in here
too.




drumm




More information about the drupal-devel mailing list