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

[dw-free] fix warnings from reading page with multiple feed entries

[commit: http://hg.dwscoalition.org/dw-free/rev/1b1e25f28bc8]

http://bugs.dwscoalition.org/show_bug.cgi?id=3991

If there is no adultcontent option, the default should be "any", so we can
skip this block.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/DW/User/ContentFilters/Filter.pm
--------------------------------------------------------------------------------
diff -r 78543b79f924 -r 1b1e25f28bc8 cgi-bin/DW/User/ContentFilters/Filter.pm
--- a/cgi-bin/DW/User/ContentFilters/Filter.pm	Tue Oct 25 19:53:22 2011 +0800
+++ b/cgi-bin/DW/User/ContentFilters/Filter.pm	Wed Oct 26 15:00:38 2011 +0800
@@ -250,7 +250,7 @@
     }
 
     # step 2) adult content flag
-    if ( $opts->{adultcontent} ne 'any' ) {
+    if ( $opts->{adultcontent} && $opts->{adultcontent} ne 'any' ) {
         my $aclevel = $entry->adult_content_calculated;
 
         if ( $aclevel ) {
--------------------------------------------------------------------------------