afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-12-14 04:54 pm

[dw-free] OPML ?show=P / show=C also includes feed accounts

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

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

Allow to filter tools/opml by syndicated (?show=F); also allow to filter by
multiple types

Patch by [personal profile] afuna.

Files modified:
  • htdocs/tools/opml.bml
--------------------------------------------------------------------------------
diff -r 4e95cae969d9 -r faf5a504a662 htdocs/tools/opml.bml
--- a/htdocs/tools/opml.bml	Mon Dec 14 16:51:31 2009 +0000
+++ b/htdocs/tools/opml.bml	Mon Dec 14 16:53:59 2009 +0000
@@ -55,11 +55,11 @@
 
         # identity accounts do not have feeds
         next if $w->is_identity;
-        # if we only want to show personal accounts
-        next if $GET{show} eq 'P' and $w->is_community;
-        # if we only want to show communities
-        next if $GET{show} eq 'C' and $w->is_person;
-
+        # filter by account type
+        next if $GET{show} && ! ( $GET{show} =~ /[P]/ && $w->is_person
+                    || $GET{show} =~ /[C]/ && $w->is_community 
+                    || $GET{show} =~ /[YF]/ && $w->is_syndicated );
+                    
         my $title;
         
         # use the username + site abbreviation for each feed's title if we have that
--------------------------------------------------------------------------------