fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2011-09-29 04:53 pm

[dw-free] Hiding of community membership on profile page follows "hide circled by", not &q

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

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

Use the more specific option.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/DW/Logic/ProfilePage.pm
--------------------------------------------------------------------------------
diff -r 019aba8303dc -r 6c913dabed65 cgi-bin/DW/Logic/ProfilePage.pm
--- a/cgi-bin/DW/Logic/ProfilePage.pm	Fri Sep 30 00:20:57 2011 +0800
+++ b/cgi-bin/DW/Logic/ProfilePage.pm	Fri Sep 30 00:53:33 2011 +0800
@@ -899,6 +899,7 @@
     my $remote = $self->{remote};
 
     return 1 if $list =~ /^posting_access/;
+    return 1 if $list =~ /of_comms$/ && $u->prop( 'opt_hidememberofs' );
     return 1 if $u->prop( 'opt_hidefriendofs' );
     return 0;
 }
--------------------------------------------------------------------------------
kareila: "PERL!" (perl)

[personal profile] kareila 2011-09-29 09:00 pm (UTC)(link)
It occurs to me that opt_hidefriendofs should probably be checked first since it's more inclusive, unless we want to change the two options to be truly separate, like so:

 return 1 if $list =~ /^posting_access/;
 return $u->prop( 'opt_hidememberofs' ) if $list =~ /of_comms$/;
 return 1 if $u->prop( 'opt_hidefriendofs' );
 return 0;