[dw-free] fix display logic for "special themes" in moodlist.bml
[commit: http://hg.dwscoalition.org/dw-free/rev/e477014f1195]
http://bugs.dwscoalition.org/show_bug.cgi?id=2694
Don't show the special themes bar, if there were no special themes to show.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2694
Don't show the special themes bar, if there were no special themes to show.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- htdocs/moodlist.bml
-------------------------------------------------------------------------------- diff -r 64de350ea481 -r e477014f1195 htdocs/moodlist.bml --- a/htdocs/moodlist.bml Fri Jun 11 13:52:12 2010 +0800 +++ b/htdocs/moodlist.bml Fri Jun 11 14:13:20 2010 +0800 @@ -73,6 +73,8 @@ body<= } @themes = sort { lc($a->{name}) cmp lc($b->{name}) } @themes; my @special_themes = LJ::Hooks::run_hook('modify_mood_theme_list', \@themes, user => $u); + # validate the list (should only contain hashrefs) + @special_themes = grep { ref $_ } @special_themes; my $do_mood_list = sub { # Setup the paging bar --------------------------------------------------------------------------------