fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-06-11 06:07 am

[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 [personal profile] kareila.

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
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org