Set default value for tag mode to fix bug with subscribing by tag.

        Patch by afuna. 

diffs (21 lines):

diff -r 568bf43b36e1 -r 7d01195ed51a cgi-bin/DW/User/ContentFilters/Filter.pm
--- a/cgi-bin/DW/User/ContentFilters/Filter.pm  Wed Mar 17 05:08:45 2010 +0000
+++ b/cgi-bin/DW/User/ContentFilters/Filter.pm  Wed Mar 17 05:14:27 2010 +0000
@@ -258,12 +258,16 @@ sub show_entry {
     # step 3) tags, but only if they actually selected some
     my @tagids = @{ $opts->{tags} || [] };
     if ( scalar @tagids > 0 ) {
+
+        # set a default/assumed value
+        $opts->{tagmode} ||= 'any_of';
+
         # we change the initial state to make the logic below easier
         my $include = {
                 none_of => 1,
                 any_of => 0,
                 all_of => 0,
-            }->{$opts->{tagmode} || 'any_of'};
+            }->{$opts->{tagmode}};
         return $fail->( 'bad_tagmode' ) unless defined $include;
 
         # now iterate over each tag and alter $include
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to