Handle moods in entries (imported by a client?) that don't actually 
exist on our servers.

        Patch by kareila. 

diffs (11 lines):

diff -r a3517b21587c -r 188c1afc510d cgi-bin/DW/Controller/Latest/Mood.pm
--- a/cgi-bin/DW/Controller/Latest/Mood.pm      Tue Oct 05 11:49:20 2010 +0800
+++ b/cgi-bin/DW/Controller/Latest/Mood.pm      Tue Oct 05 11:51:43 2010 +0800
@@ -52,6 +52,7 @@ sub mood_handler {
         my $metadata = DW::Mood->get_moods;
 
         foreach my $moodid ( @$moods ) {
+            next unless $metadata->{$moodid};
             $score += $metadata->{$moodid}->{weight} || 50;
             $counts{$metadata->{$moodid}->{name}}++;
         }
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to